1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one or more 3 * contributor license agreements. See the NOTICE file distributed with 4 * this work for additional information regarding copyright ownership. 5 * The ASF licenses this file to You under the Apache License, Version 2.0 6 * (the "License"); you may not use this file except in compliance with 7 * the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 /** 20 * @author Aleksey V. Yantsen 21 */ 22 23 /** 24 * Created on 12.03.2004 25 */ 26 package org.apache.harmony.jpda.tests.framework.jdwp; 27 28 /** 29 * This class defines constants for JDWP commands and command sets. 30 */ 31 public class JDWPCommands { 32 33 /** 34 * JDWP VirtualMachine Command Set constants. 35 */ 36 public class VirtualMachineCommandSet { 37 38 public static final byte CommandSetID = 1; 39 40 public static final byte VersionCommand = 1; 41 42 public static final byte ClassesBySignatureCommand = 2; 43 44 public static final byte AllClassesCommand = 3; 45 46 public static final byte AllThreadsCommand = 4; 47 48 public static final byte TopLevelThreadGroupsCommand = 5; 49 50 public static final byte DisposeCommand = 6; 51 52 public static final byte IDSizesCommand = 7; 53 54 public static final byte SuspendCommand = 8; 55 56 public static final byte ResumeCommand = 9; 57 58 public static final byte ExitCommand = 10; 59 60 public static final byte CreateStringCommand = 11; 61 62 public static final byte CapabilitiesCommand = 12; 63 64 public static final byte ClassPathsCommand = 13; 65 66 public static final byte DisposeObjectsCommand = 14; 67 68 public static final byte HoldEventsCommand = 15; 69 70 public static final byte ReleaseEventsCommand = 16; 71 72 public static final byte CapabilitiesNewCommand = 17; 73 74 public static final byte RedefineClassesCommand = 18; 75 76 public static final byte SetDefaultStratumCommand = 19; 77 78 public static final byte AllClassesWithGenericCommand = 20; 79 80 //New commands for Java 6 81 public static final byte InstanceCountsCommand = 21; 82 } 83 84 /** 85 * JDWP ReferenceType Command Set constants. 86 */ 87 public class ReferenceTypeCommandSet { 88 89 public static final byte CommandSetID = 2; 90 91 public static final byte SignatureCommand = 1; 92 93 public static final byte ClassLoaderCommand = 2; 94 95 public static final byte ModifiersCommand = 3; 96 97 public static final byte FieldsCommand = 4; 98 99 public static final byte MethodsCommand = 5; 100 101 public static final byte GetValuesCommand = 6; 102 103 public static final byte SourceFileCommand = 7; 104 105 public static final byte NestedTypesCommand = 8; 106 107 public static final byte StatusCommand = 9; 108 109 public static final byte InterfacesCommand = 10; 110 111 public static final byte ClassObjectCommand = 11; 112 113 public static final byte SourceDebugExtensionCommand = 12; 114 115 public static final byte SignatureWithGenericCommand = 13; 116 117 public static final byte FieldsWithGenericCommand = 14; 118 119 public static final byte MethodsWithGenericCommand = 15; 120 121 //New commands for Java 6 122 public static final byte InstancesCommand = 16; 123 124 public static final byte ClassFileVersionCommand = 17; 125 126 public static final byte ConstantPoolCommand = 18; 127 } 128 129 /** 130 * JDWP ClassType Command Set constants. 131 */ 132 public class ClassTypeCommandSet { 133 134 public static final byte CommandSetID = 3; 135 136 public static final byte SuperclassCommand = 1; 137 138 public static final byte SetValuesCommand = 2; 139 140 public static final byte InvokeMethodCommand = 3; 141 142 public static final byte NewInstanceCommand = 4; 143 } 144 145 /** 146 * JDWP ArrayType Command Set constants. 147 */ 148 public class ArrayTypeCommandSet { 149 150 public static final byte CommandSetID = 4; 151 152 public static final byte NewInstanceCommand = 1; 153 } 154 155 /** 156 * JDWP InterfaceType Command Set constants. 157 */ 158 public class InterfaceTypeCommandSet { 159 public static final byte CommandSetID = 5; 160 } 161 162 /** 163 * JDWP Method Command Set constants. 164 */ 165 public class MethodCommandSet { 166 167 public static final byte CommandSetID = 6; 168 169 public static final byte LineTableCommand = 1; 170 171 public static final byte VariableTableCommand = 2; 172 173 public static final byte BytecodesCommand = 3; 174 175 public static final byte IsObsoleteCommand = 4; 176 177 public static final byte VariableTableWithGenericCommand = 5; 178 } 179 180 /** 181 * JDWP Field Command Set constants. 182 */ 183 public class FieldCommandSet { 184 185 public static final byte CommandSetID = 8; 186 } 187 188 /** 189 * JDWP ObjectReference Command Set constants. 190 */ 191 public class ObjectReferenceCommandSet { 192 193 public static final byte CommandSetID = 9; 194 195 public static final byte ReferenceTypeCommand = 1; 196 197 public static final byte GetValuesCommand = 2; 198 199 public static final byte SetValuesCommand = 3; 200 201 public static final byte MonitorInfoCommand = 5; 202 203 public static final byte InvokeMethodCommand = 6; 204 205 public static final byte DisableCollectionCommand = 7; 206 207 public static final byte EnableCollectionCommand = 8; 208 209 public static final byte IsCollectedCommand = 9; 210 211 //New commands for Java 6 212 public static final byte ReferringObjectsCommand = 10; 213 } 214 215 /** 216 * JDWP String Command Set constants. 217 */ 218 public class StringReferenceCommandSet { 219 220 public static final byte CommandSetID = 10; 221 222 public static final byte ValueCommand = 1; 223 } 224 225 /** 226 * JDWP ThreadReference Command Set constants. 227 */ 228 public class ThreadReferenceCommandSet { 229 230 public static final byte CommandSetID = 11; 231 232 public static final byte NameCommand = 1; 233 234 public static final byte SuspendCommand = 2; 235 236 public static final byte ResumeCommand = 3; 237 238 public static final byte StatusCommand = 4; 239 240 public static final byte ThreadGroupCommand = 5; 241 242 public static final byte FramesCommand = 6; 243 244 public static final byte FrameCountCommand = 7; 245 246 public static final byte OwnedMonitorsCommand = 8; 247 248 public static final byte CurrentContendedMonitorCommand = 9; 249 250 public static final byte StopCommand = 10; 251 252 public static final byte InterruptCommand = 11; 253 254 public static final byte SuspendCountCommand = 12; 255 256 //New command for Java 6 257 public static final byte OwnedMonitorsStackDepthInfoCommand = 13; 258 259 public static final byte ForceEarlyReturnCommand = 14; 260 } 261 262 /** 263 * JDWP ThreadGroupReference Command Set constants. 264 */ 265 public class ThreadGroupReferenceCommandSet { 266 267 public static final byte CommandSetID = 12; 268 269 public static final byte NameCommand = 1; 270 271 public static final byte ParentCommand = 2; 272 273 public static final byte ChildrenCommand = 3; 274 } 275 276 /** 277 * JDWP ArrayReference Command Set constants. 278 */ 279 public class ArrayReferenceCommandSet { 280 281 public static final byte CommandSetID = 13; 282 283 public static final byte LengthCommand = 1; 284 285 public static final byte GetValuesCommand = 2; 286 287 public static final byte SetValuesCommand = 3; 288 } 289 290 /** 291 * JDWP ClassLoaderReference Command Set constants. 292 */ 293 public class ClassLoaderReferenceCommandSet { 294 295 public static final byte CommandSetID = 14; 296 297 public static final byte VisibleClassesCommand = 1; 298 } 299 300 /** 301 * JDWP EventRequest Command Set constants. 302 */ 303 public class EventRequestCommandSet { 304 305 public static final byte CommandSetID = 15; 306 307 public static final byte SetCommand = 1; 308 309 public static final byte ClearCommand = 2; 310 311 public static final byte ClearAllBreakpointsCommand = 3; 312 } 313 314 /** 315 * JDWP StackFrame Command Set constants. 316 */ 317 public class StackFrameCommandSet { 318 319 public static final byte CommandSetID = 16; 320 321 public static final byte GetValuesCommand = 1; 322 323 public static final byte SetValuesCommand = 2; 324 325 public static final byte ThisObjectCommand = 3; 326 327 public static final byte PopFramesCommand = 4; 328 } 329 330 /** 331 * JDWP ClassObjectReference Command Set constants. 332 */ 333 public class ClassObjectReferenceCommandSet { 334 335 public static final byte CommandSetID = 17; 336 337 public static final byte ReflectedTypeCommand = 1; 338 } 339 340 /** 341 * JDWP Event Command Set constants. 342 */ 343 public class EventCommandSet { 344 345 public static final byte CommandSetID = 64; 346 347 public static final byte CompositeCommand = 100; 348 } 349 350 } 351