本文整理匯總了Java中org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket.getNextValueAsThreadID方法的典型用法代碼示例。如果您正苦於以下問題:Java CommandPacket.getNextValueAsThreadID方法的具體用法?Java CommandPacket.getNextValueAsThreadID怎麽用?Java CommandPacket.getNextValueAsThreadID使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket
的用法示例。
在下文中一共展示了CommandPacket.getNextValueAsThreadID方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: waitEvent
import org.apache.harmony.jpda.tests.framework.jdwp.CommandPacket; //導入方法依賴的package包/類
protected long waitEvent(int requestID) {
long targetThreadID = 0;
CommandPacket event = debuggeeWrapper.vmMirror
.receiveCertainEvent(JDWPConstants.EventKind.METHOD_ENTRY);
byte suspendPolicy = event.getNextValueAsByte();
int events = event.getNextValueAsInt();
logWriter.println(" EVENT_THREAD event: suspendPolicy=" + suspendPolicy
+ " events=" + events);
for (int i = 0; i < events; i++) {
byte eventKind = event.getNextValueAsByte();
int newRequestID = event.getNextValueAsInt();
long threadID = event.getNextValueAsThreadID();
//Location location =
event.getNextValueAsLocation();
logWriter.println(" EVENT_THREAD event " + i + ": eventKind="
+ eventKind + " requestID=" + newRequestID + " threadID="
+ threadID);
if (newRequestID == requestID) {
targetThreadID = threadID;
}
}
assertAllDataRead(event);
assertTrue("targetThreadID must be != 0", targetThreadID != 0);
return targetThreadID;
}