1 55 56 package org.apache.bsf.debug.util; 57 58 public class DebugConstants { 59 60 62 public static final int BSF_DEBUG_SERVER_PORT = 4444; 63 64 66 public static final int BSF_DEBUG_PROTOCOL_MAJOR = 1; 67 public static final int BSF_DEBUG_PROTOCOL_MINOR = 0; 68 public static final int BSF_DEBUG_PROTOCOL_ACCEPT = 1; 69 public static final int BSF_DEBUG_PROTOCOL_REJECT = 0; 70 71 public static final int WAIT_FOR_VOID = 50; 73 public static final int WAIT_FOR_BOOLEAN= 51; 74 public static final int WAIT_FOR_INT = 52; 75 public static final int WAIT_FOR_LONG = 53; 76 public static final int WAIT_FOR_FLOAT = 54; 77 public static final int WAIT_FOR_DOUBLE = 55; 78 public static final int WAIT_FOR_OBJECT = 56; 79 public static final int WAIT_FOR_MIRROR = 57; 80 81 82 84 public static final int NULLTID = 1; 85 public static final int NULLUID = 2; 86 87 public static final int UNKNOWN_TID = 3; 88 public static final int UNKNOWN_UID = 4; 89 90 public static final int SPECIAL_TID = 5; 91 public static final int NOT_FOUND_UID = 6; 92 public static final int UNDEFINED_UID = 7; 93 94 public static final int BSF_DEBUG_MANAGER_UID = 8; 95 96 public static final int FIRST_NON_RESERVED_UID = 9999; 98 99 101 public static final int NULL_OBJECT = 99; 102 public static final int VALUE_OBJECT = 100; 103 public static final int STUB_OBJECT = 101; 104 public static final int SKEL_OBJECT = 102; 105 106 110 111 115 public static final int BSF_DEBUG_MANAGER_TID = 104; 116 public static final int JS_ENGINE_TID = 105; 117 public static final int JS_CONTEXT_TID = 106; 118 public static final int JS_OBJECT_TID = 107; 119 120 public static final int BSF_DEBUGGER_TID = 108; 121 public static final int JS_CALLBACKS_TID = 109; 122 123 public static final int VALUE_OBJECT_TID = 110; 124 125 public static final int JS_CODE_TID = 111; 126 127 133 public static final int ERROR_OCCURED = 150; 134 135 136 public static final int DM_GET_LANG_FROM_FILENAME = 300; 139 public static final int DM_IS_LANGUAGE_REGISTERED = 301; 140 public static final int DM_PLACE_BREAKPOINT_AT_LINE = 302; 141 public static final int DM_REMOVE_BREAKPOINT = 303; 142 public static final int DM_SET_ENTRY_EXIT = 304; 143 public static final int DM_REGISTER_DEBUGGER_FOR_LANG = 305; 144 public static final int DM_UNREGISTER_DEBUGGER_FOR_LANG = 306; 145 public static final int DM_QUIT_NOTIFY = 307; 146 147 public static final int JE_GET_CONTEXT_AT = 401; 150 public static final int JE_GET_CONTEXT_COUNT = 402; 151 152 public static final int JE_RUN = 404; 153 public static final int JE_STEP_IN = 405; 154 public static final int JE_STEP_OUT = 406; 155 public static final int JE_STEP_OVER = 407; 156 157 public static final int JE_GET_GLOBAL_OBJECT = 409; 158 public static final int JE_GET_UNDEFINED_VALUE = 410; 159 160 public static final int JE_SET_DEBUGGER = 411; 161 public static final int JE_GET_THREAD = 412; 162 public static final int JE_GET_THREADGROUP = 413; 163 164 public static final int JO_DEFINE = 501; 167 public static final int JO_DELETE_BY_INDEX = 502; 168 public static final int JO_DELETE_BY_NAME = 503; 169 public static final int JO_GET_BY_NAME = 504; 170 public static final int JO_GET_BY_INDEX = 505; 171 public static final int JO_GET_CLASSNAME = 506; 172 public static final int JO_GET_DEFAULT_VALUE = 507; 173 public static final int JO_GET_IDS = 508; 174 public static final int JO_HAS_BY_INDEX = 509; 175 public static final int JO_HAS_BY_NAME = 510; 176 public static final int JO_GET_PROTOTYPE = 511; 177 public static final int JO_GET_SCOPE = 512; 178 public static final int JO_HAS_INSTANCE = 513; 179 public static final int JO_PUT_BY_INDEX = 514; 180 public static final int JO_PUT_BY_NAME = 515; 181 public static final int JO_SET_PROTOTYPE = 516; 182 public static final int JO_SET_SCOPE = 517; 183 184 public static final int JO_FUNCTION = 600; 185 public static final int JO_SCRIPT = 601; 186 187 public static final int JC_GET_LINE_NUMBERS = 610; 190 191 public static final int BSFD_CREATED_ENGINE = 701; 194 public static final int BSFD_DELETED_ENGINE = 702; 195 public static final int BSFD_DISCONNECT = 703; 196 197 198 public static final int CX_BIND = 800; 201 public static final int CX_GET_CODE = 801; 202 public static final int CX_GET_DEPTH = 802; 203 public static final int CX_GET_ENGINE = 803; 204 public static final int CX_GET_LINE_NUMBER = 804; 205 public static final int CX_GET_SCOPE = 805; 206 public static final int CX_GET_SOURCE_NAME = 806; 207 public static final int CX_GET_THIS = 807; 208 209 212 public static final int CB_POLL = 900; 213 public static final int CB_HANDLE_BREAKPOINT_HIT = 901; 214 public static final int CB_HANDLE_ENGINE_STOPPED = 902; 215 public static final int CB_HANDLE_EXCEPTION_THROWN = 903; 216 public static final int CB_HANDLE_STEPPING_DONE = 904; 217 218 static IntHashtable m_constantNames; 222 223 public static String getConstantName(int id) { 224 String name = (String )m_constantNames.get(id); 225 if (name==null) name = "Unknown name for "+Integer.toString(id); 226 return name; 227 } 228 229 static { 230 m_constantNames = new IntHashtable(); 231 232 m_constantNames.put(NULLTID,"NULLTID"); 233 m_constantNames.put(NULLUID,"NULLUID"); 234 m_constantNames.put(UNKNOWN_TID,"UNKNOWN_TID"); 235 m_constantNames.put(UNKNOWN_UID,"UNKNOWN_UID"); 236 m_constantNames.put(SPECIAL_TID,"SPECIAL_TID"); 237 m_constantNames.put(NOT_FOUND_UID,"NOT_FOUND_UID"); 238 m_constantNames.put(UNDEFINED_UID,"UNDEFINED_UID"); 239 m_constantNames.put(NULL_OBJECT,"NULL_OBJECT"); 240 m_constantNames.put(VALUE_OBJECT,"VALUE_OBJECT"); 241 m_constantNames.put(STUB_OBJECT,"STUB_OBJECT"); 242 m_constantNames.put(SKEL_OBJECT,"SKEL_OBJECT"); 243 m_constantNames.put(BSF_DEBUG_MANAGER_UID,"BSF_DEBUG_MANAGER_UID"); 244 m_constantNames.put(BSF_DEBUG_MANAGER_TID,"BSF_DEBUG_MANAGER_TID"); 245 m_constantNames.put(JS_ENGINE_TID,"JS_ENGINE_TID"); 246 m_constantNames.put(JS_CALLBACKS_TID,"JS_CALLBACKS_TID"); 247 m_constantNames.put(JS_CONTEXT_TID,"JS_CONTEXT_TID"); 248 m_constantNames.put(JS_OBJECT_TID,"JS_OBJECT_TID"); 249 m_constantNames.put(JS_CODE_TID,"JS_CODE_TID"); 250 m_constantNames.put(VALUE_OBJECT_TID,"VALUE_OBJECT_TID"); 251 m_constantNames.put(BSF_DEBUGGER_TID,"BSF_DEBUGGER_TID"); 252 m_constantNames.put(ERROR_OCCURED,"ERROR_OCCURED"); 253 m_constantNames.put(DM_GET_LANG_FROM_FILENAME,"DM_GET_LANG_FROM_FILENAME"); 254 m_constantNames.put(DM_IS_LANGUAGE_REGISTERED,"DM_IS_LANGUAGE_REGISTERED"); 255 m_constantNames.put(DM_PLACE_BREAKPOINT_AT_LINE,"DM_PLACE_BREAKPOINT_AT_LINE"); 256 m_constantNames.put(DM_REMOVE_BREAKPOINT,"DM_REMOVE_BREAKPOINT"); 257 m_constantNames.put(DM_REGISTER_DEBUGGER_FOR_LANG,"DM_REGISTER_DEBUGGER_FOR_LANG"); 258 m_constantNames.put(DM_UNREGISTER_DEBUGGER_FOR_LANG,"DM_UNREGISTER_DEBUGGER_FOR_LANG"); 259 m_constantNames.put(DM_SET_ENTRY_EXIT,"DM_SET_ENTRY_EXIT"); 260 m_constantNames.put(DM_QUIT_NOTIFY,"DM_QUIT_NOTIFY"); 261 m_constantNames.put(JE_GET_CONTEXT_AT,"JE_GET_CONTEXT_AT"); 262 m_constantNames.put(JE_GET_CONTEXT_COUNT,"JE_GET_CONTEXT_COUNT"); 263 m_constantNames.put(JE_RUN,"JE_RUN"); 264 m_constantNames.put(JE_STEP_IN,"JE_STEP_IN"); 265 m_constantNames.put(JE_STEP_OUT,"JE_STEP_OUT"); 266 m_constantNames.put(JE_STEP_OVER,"JE_STEP_OVER"); 267 m_constantNames.put(JE_GET_GLOBAL_OBJECT,"JE_GET_GLOBAL_OBJECT"); 268 m_constantNames.put(JE_GET_UNDEFINED_VALUE,"JE_GET_UNDEFINED_VALUE"); 269 m_constantNames.put(JE_SET_DEBUGGER,"JE_SET_DEBUGGER"); 270 m_constantNames.put(JE_GET_THREAD,"JE_GET_THREAD"); 271 m_constantNames.put(JE_GET_THREADGROUP,"JE_GET_THREADGROUP"); 272 m_constantNames.put(JO_DEFINE,"JO_DEFINE"); 273 m_constantNames.put(JO_DELETE_BY_INDEX,"JO_DELETE_BY_INDEX"); 274 m_constantNames.put(JO_DELETE_BY_NAME,"JO_DELETE_BY_NAME"); 275 m_constantNames.put(JO_GET_BY_NAME,"JO_GET_BY_NAME"); 276 m_constantNames.put(JO_GET_BY_INDEX,"JO_GET_BY_INDEX"); 277 m_constantNames.put(JO_GET_CLASSNAME,"JO_GET_CLASSNAME"); 278 m_constantNames.put(JO_GET_DEFAULT_VALUE,"JO_GET_DEFAULT_VALUE"); 279 m_constantNames.put(JO_GET_IDS,"JO_GET_IDS"); 280 m_constantNames.put(JO_HAS_BY_INDEX,"JO_HAS_BY_INDEX"); 281 m_constantNames.put(JO_HAS_BY_NAME,"JO_HAS_BY_NAME"); 282 m_constantNames.put(JO_GET_PROTOTYPE,"JO_GET_PROTOTYPE"); 283 m_constantNames.put(JO_GET_SCOPE,"JO_GET_SCOPE"); 284 m_constantNames.put(JO_HAS_INSTANCE,"JO_HAS_INSTANCE"); 285 m_constantNames.put(JO_PUT_BY_INDEX,"JO_PUT_BY_INDEX"); 286 m_constantNames.put(JO_PUT_BY_NAME,"JO_PUT_BY_NAME"); 287 m_constantNames.put(JO_SET_PROTOTYPE,"JO_SET_PROTOTYPE"); 288 m_constantNames.put(JO_SET_SCOPE,"JO_SET_SCOPE"); 289 m_constantNames.put(JO_FUNCTION,"JO_FUNCTION"); 290 m_constantNames.put(JO_SCRIPT,"JO_SCRIPT"); 291 m_constantNames.put(JC_GET_LINE_NUMBERS,"JC_GET_LINE_NUMBERS"); 292 m_constantNames.put(BSFD_CREATED_ENGINE,"BSFD_CREATED_ENGINE"); 293 m_constantNames.put(BSFD_DELETED_ENGINE,"BSFD_DELETED_ENGINE"); 294 m_constantNames.put(BSFD_DISCONNECT,"BSFD_DISCONNECT"); 295 m_constantNames.put(CX_BIND,"CX_BIND"); 296 m_constantNames.put(CX_GET_CODE,"CX_GET_CODE"); 297 m_constantNames.put(CX_GET_DEPTH,"CX_GET_DEPTH"); 298 m_constantNames.put(CX_GET_ENGINE,"CX_GET_ENGINE"); 299 m_constantNames.put(CB_POLL,"CB_POLL"); 300 m_constantNames.put(CX_GET_SCOPE,"CX_GET_SCOPE"); 301 m_constantNames.put(CX_GET_LINE_NUMBER,"CX_GET_LINE_NUMBER"); 302 m_constantNames.put(CX_GET_SOURCE_NAME,"CX_GET_SOURCE_NAME"); 303 m_constantNames.put(CX_GET_THIS,"CX_GET_THIS"); 304 m_constantNames.put(CB_POLL,"CB_POLL"); 305 m_constantNames.put(CB_HANDLE_BREAKPOINT_HIT,"CB_HANDLE_BREAKPOINT_HIT"); 306 m_constantNames.put(CB_HANDLE_ENGINE_STOPPED,"CB_HANDLE_ENGINE_STOPPED"); 307 m_constantNames.put(CB_HANDLE_STEPPING_DONE,"CB_HANDLE_STEPPING_DONE"); 308 m_constantNames.put(CB_HANDLE_EXCEPTION_THROWN,"CB_HANDLE_EXCEPTION_THROWN"); 309 310 } 311 312 } 313 314 | Popular Tags |