本文整理汇总了Java中org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket.setCommand方法的典型用法代码示例。如果您正苦于以下问题:Java CommandPacket.setCommand方法的具体用法?Java CommandPacket.setCommand怎么用?Java CommandPacket.setCommand使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket
的用法示例。
在下文中一共展示了CommandPacket.setCommand方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clearBreakpoint
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Removes breakpoint according to specified requestID.
*
* @param requestID
* for given breakpoint
* @return ReplyPacket for corresponding command
*/
public ReplyPacket clearBreakpoint(int requestID) {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
// Set command. "2" - is ID of Clear command in EventRequest Command Set
commandPacket
.setCommand(JDWPCommands.EventRequestCommandSet.ClearCommand);
// Set command set. "15" - is ID of EventRequest Command Set
commandPacket
.setCommandSet(JDWPCommands.EventRequestCommandSet.CommandSetID);
// Set outgoing data
// Set eventKind
commandPacket.setNextValueAsByte(JDWPConstants.EventKind.BREAKPOINT);
// Set suspendPolicy
commandPacket.setNextValueAsInt(requestID);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例2: ClearAllBreakpoints
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Removes all breakpoints.
*
* @return ReplyPacket for corresponding command
*/
public ReplyPacket ClearAllBreakpoints() {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
// Set command. "3" - is ID of ClearAllBreakpoints command in
// EventRequest Command Set
commandPacket
.setCommand(JDWPCommands.EventRequestCommandSet.ClearAllBreakpointsCommand);
// Set command set. "15" - is ID of EventRequest Command Set
commandPacket
.setCommandSet(JDWPCommands.EventRequestCommandSet.CommandSetID);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例3: getMethods
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Gets method reference by signature.
*
* @param classReferenceTypeID
* class referenceTypeID.
* @return ReplyPacket for corresponding command
*/
public ReplyPacket getMethods(long classReferenceTypeID) {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
// Set command. "5" - is ID of Methods command in ReferenceType Command
// Set
commandPacket
.setCommand(JDWPCommands.ReferenceTypeCommandSet.MethodsCommand);
// Set command set. "2" - is ID of ReferenceType Command Set
commandPacket
.setCommandSet(JDWPCommands.ReferenceTypeCommandSet.CommandSetID);
// Set outgoing data
// Set referenceTypeID
commandPacket.setNextValueAsObjectID(classReferenceTypeID);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例4: clearEvent
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Clear an event request for specified request ID.
*
* @param eventKind
* event type to clear
* @param requestID
* request ID to clear
* @return ReplyPacket for corresponding command
*/
public ReplyPacket clearEvent(byte eventKind, int requestID) {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
// Set command. "2" - is ID of Clear command in EventRequest Command Set
commandPacket
.setCommand(JDWPCommands.EventRequestCommandSet.ClearCommand);
// Set command set. "15" - is ID of EventRequest Command Set
commandPacket
.setCommandSet(JDWPCommands.EventRequestCommandSet.CommandSetID);
// Set outgoing data
// Set event type to clear
commandPacket.setNextValueAsByte(eventKind);
// Set ID of request to clear
commandPacket.setNextValueAsInt(requestID);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例5: dispose
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Disposes connection to debuggee VM.
*
* @return ReplyPacket for corresponding command
*/
public ReplyPacket dispose() {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
commandPacket
.setCommand(JDWPCommands.VirtualMachineCommandSet.DisposeCommand);
commandPacket
.setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例6: exit
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Exits debuggee VM process.
*
* @return ReplyPacket for corresponding command
*/
public ReplyPacket exit(int exitCode) {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
commandPacket
.setCommand(JDWPCommands.VirtualMachineCommandSet.ExitCommand);
commandPacket
.setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);
commandPacket.setNextValueAsInt(exitCode);
// Send packet
return checkReply(performCommand(commandPacket));
}
示例7: capabilities
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Requests debuggee VM capabilities. Function parses reply packet of
* VirtualMachine::CapabilitiesNew command, creates and fills class
* Capabilities with returned info.
*
* @return ReplyPacket useless, already parsed reply packet.
*/
public ReplyPacket capabilities() {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
// Set command. "17" - is ID of CapabilitiesNew command in
// VirtualMachine Command Set
commandPacket
.setCommand(JDWPCommands.VirtualMachineCommandSet.CapabilitiesNewCommand);
// Set command set. "1" - is ID of VirtualMachine Command Set
commandPacket
.setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);
// Send packet
ReplyPacket replyPacket = checkReply(performCommand(commandPacket));
targetVMCapabilities = new Capabilities();
// Set capabilities
targetVMCapabilities.canWatchFieldModification = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canWatchFieldAccess = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetBytecodes = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetSyntheticAttribute = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetOwnedMonitorInfo = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetCurrentContendedMonitor = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetMonitorInfo = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canRedefineClasses = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canAddMethod = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.canUnrestrictedlyRedefineClasses = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canPopFrames = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.canUseInstanceFilters = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetSourceDebugExtension = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canRequestVMDeathEvent = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canSetDefaultStratum = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canGetInstanceInfo = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.reserved17 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.canGetMonitorFrameInfo = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canUseSourceNameFilters = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.canGetConstantPool = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.canForceEarlyReturn = replyPacket
.getNextValueAsBoolean();
targetVMCapabilities.reserved22 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved23 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved24 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved25 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved26 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved27 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved28 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved29 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved30 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved31 = replyPacket.getNextValueAsBoolean();
targetVMCapabilities.reserved32 = replyPacket.getNextValueAsBoolean();
return replyPacket;
}
示例8: adjustTypeLength
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //导入方法依赖的package包/类
/**
* Adjusts lengths for all VM-specific types.
*
* @return ReplyPacket for corresponding command
*/
public ReplyPacket adjustTypeLength() {
// Create new command packet
CommandPacket commandPacket = new CommandPacket();
commandPacket
.setCommand(JDWPCommands.VirtualMachineCommandSet.IDSizesCommand);
commandPacket
.setCommandSet(JDWPCommands.VirtualMachineCommandSet.CommandSetID);
// Send packet
ReplyPacket replyPacket = checkReply(performCommand(commandPacket));
// Get FieldIDSize from ReplyPacket
TypesLengths.setTypeLength(TypesLengths.FIELD_ID, replyPacket
.getNextValueAsInt());
// Get MethodIDSize from ReplyPacket
TypesLengths.setTypeLength(TypesLengths.METHOD_ID, replyPacket
.getNextValueAsInt());
// Get ObjectIDSize from ReplyPacket
TypesLengths.setTypeLength(TypesLengths.OBJECT_ID, replyPacket
.getNextValueAsInt());
// Get ReferenceTypeIDSize from ReplyPacket
TypesLengths.setTypeLength(TypesLengths.REFERENCE_TYPE_ID, replyPacket
.getNextValueAsInt());
// Get FrameIDSize from ReplyPacket
TypesLengths.setTypeLength(TypesLengths.FRAME_ID, replyPacket
.getNextValueAsInt());
// Adjust all other types lengths
TypesLengths.setTypeLength(TypesLengths.ARRAY_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.STRING_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.THREAD_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.THREADGROUP_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.LOCATION_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.CLASS_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.CLASSLOADER_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
TypesLengths.setTypeLength(TypesLengths.CLASSOBJECT_ID, TypesLengths
.getTypeLength(TypesLengths.OBJECT_ID));
return replyPacket;
}