本文整理汇总了Java中com.sun.jdi.event.EventSet.suspendPolicy方法的典型用法代码示例。如果您正苦于以下问题:Java EventSet.suspendPolicy方法的具体用法?Java EventSet.suspendPolicy怎么用?Java EventSet.suspendPolicy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.jdi.event.EventSet
的用法示例。
在下文中一共展示了EventSet.suspendPolicy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: remove
import com.sun.jdi.event.EventSet; //导入方法依赖的package包/类
/**
* Filter out events not for user's eyes.
* Then filter out empty sets.
*/
public EventSet remove(long timeout) throws InterruptedException {
if (timeout < 0) {
throw new IllegalArgumentException("Timeout cannot be negative");
}
EventSet eventSet;
while (true) {
EventSetImpl fullEventSet = removeUnfiltered(timeout);
if (fullEventSet == null) {
eventSet = null; // timeout
break;
}
/*
* Remove events from the event set for which
* there is no corresponding enabled request (
* this includes our internally requested events.)
* This never returns null
*/
eventSet = fullEventSet.userFilter();
if (!eventSet.isEmpty()) {
break;
}
}
if ((eventSet != null) && (eventSet.suspendPolicy() == JDWP.SuspendPolicy.ALL)) {
vm.notifySuspend();
}
return eventSet;
}