本文整理汇总了Java中com.sun.jdi.request.ThreadDeathRequest类的典型用法代码示例。如果您正苦于以下问题:Java ThreadDeathRequest类的具体用法?Java ThreadDeathRequest怎么用?Java ThreadDeathRequest使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ThreadDeathRequest类属于com.sun.jdi.request包,在下文中一共展示了ThreadDeathRequest类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setEventRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
EventRequestManager erm = vm.eventRequestManager();
// Normally, we want all uncaught exceptions. We request them
// via the same mechanism as Commands.commandCatchException()
// so the user can ignore them later if they are not
// interested.
// FIXME: this works but generates spurious messages on stdout
// during startup:
// Set uncaught java.lang.Throwable
// Set deferred uncaught java.lang.Throwable
Commands evaluator = new Commands();
evaluator.commandCatchException
(new StringTokenizer("uncaught java.lang.Throwable"));
ThreadStartRequest tsr = erm.createThreadStartRequest();
tsr.enable();
ThreadDeathRequest tdr = erm.createThreadDeathRequest();
tdr.enable();
}
示例2: setEventRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
private void setEventRequests(VirtualMachine vm) {
EventRequestManager erm = vm.eventRequestManager();
// Normally, we want all uncaught exceptions. We request them
// via the same mechanism as Commands.commandCatchException()
// so the user can ignore them later if they are not
// interested.
// FIXME: this works but generates spurious messages on stdout
// during startup:
// Set uncaught java.lang.Throwable
// Set deferred uncaught java.lang.Throwable
Commands evaluator = new Commands(env);
evaluator.commandCatchException
(new StringTokenizer("uncaught java.lang.Throwable"));
ThreadStartRequest tsr = erm.createThreadStartRequest();
tsr.enable();
ThreadDeathRequest tdr = erm.createThreadDeathRequest();
tdr.enable();
}
示例3: createEventRequest
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
@Override
protected EventRequest createEventRequest(EventRequest oldRequest) throws VMDisconnectedExceptionWrapper, InternalExceptionWrapper {
if (oldRequest instanceof ThreadStartRequest) {
return EventRequestManagerWrapper.createThreadStartRequest(getEventRequestManager());
}
if (oldRequest instanceof ThreadDeathRequest) {
return EventRequestManagerWrapper.createThreadDeathRequest(getEventRequestManager());
}
return null;
}
示例4: vmAttached
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
private void vmAttached() {
DebuggerManagerThreadImpl.assertIsManagerThread();
LOG.assertTrue(!isAttached());
if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
final EventRequestManager requestManager = machineProxy.eventRequestManager();
if (machineProxy.canGetMethodReturnValues()) {
myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
}
final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadStartRequest.enable();
final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadDeathRequest.enable();
myDebugProcessDispatcher.getMulticaster().processAttached(this);
// breakpoints should be initialized after all processAttached listeners work
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
XDebugSession session = getSession().getXDebugSession();
if (session != null) {
session.initBreakpoints();
}
}
});
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
final String transportName = DebuggerBundle.getTransportName(getConnection());
showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
if (LOG.isDebugEnabled()) {
LOG.debug("leave: processVMStartEvent()");
}
}
}
示例5: wrapThreadDeathRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public static List<ThreadDeathRequest> wrapThreadDeathRequests(
F3VirtualMachine f3vm, List<ThreadDeathRequest> reqs) {
if (reqs == null) {
return null;
}
List<ThreadDeathRequest> result = new ArrayList<ThreadDeathRequest>();
for (ThreadDeathRequest req : reqs) {
result.add(wrap(f3vm, req));
}
return result;
}
示例6: vmAttached
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
private void vmAttached() {
DebuggerManagerThreadImpl.assertIsManagerThread();
LOG.assertTrue(!isAttached());
if(myState.compareAndSet(STATE_INITIAL, STATE_ATTACHED)) {
final VirtualMachineProxyImpl machineProxy = getVirtualMachineProxy();
final EventRequestManager requestManager = machineProxy.eventRequestManager();
if (machineProxy.canGetMethodReturnValues()) {
myReturnValueWatcher = new MethodReturnValueWatcher(requestManager);
}
final ThreadStartRequest threadStartRequest = requestManager.createThreadStartRequest();
threadStartRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadStartRequest.enable();
final ThreadDeathRequest threadDeathRequest = requestManager.createThreadDeathRequest();
threadDeathRequest.setSuspendPolicy(EventRequest.SUSPEND_NONE);
threadDeathRequest.enable();
DebuggerManagerEx.getInstanceEx(getProject()).getBreakpointManager().setInitialBreakpointsState();
myDebugProcessDispatcher.getMulticaster().processAttached(this);
final String addressDisplayName = DebuggerBundle.getAddressDisplayName(getConnection());
final String transportName = DebuggerBundle.getTransportName(getConnection());
showStatusText(DebuggerBundle.message("status.connected", addressDisplayName, transportName));
if (LOG.isDebugEnabled()) {
LOG.debug("leave: processVMStartEvent()");
}
}
}
示例7: setEventRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
/**
* Create the desired event requests, and enable
* them so that we will get events.
* @param excludes Class patterns for which we don't want events
* @param watchFields Do we want to watch assignments to fields
*/
void setEventRequests() {
EventRequestManager mgr = vm.eventRequestManager();
ExceptionRequest excReq = mgr.createExceptionRequest(null,true, true);
excReq.setSuspendPolicy(EventRequest.SUSPEND_ALL);
excReq.enable();
MethodEntryRequest menr = mgr.createMethodEntryRequest();
for (int i=0; i<excludes.size(); ++i) {
menr.addClassExclusionFilter(excludes.get(i));
}
menr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
menr.enable();
MethodExitRequest mexr = mgr.createMethodExitRequest();
for (int i=0; i<excludes.size(); ++i) {
mexr.addClassExclusionFilter(excludes.get(i));
}
mexr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
mexr.enable();
ThreadDeathRequest tdr = mgr.createThreadDeathRequest();
tdr.setSuspendPolicy(EventRequest.SUSPEND_ALL);
tdr.enable();
}
示例8: createThreadDeathRequest
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public ThreadDeathRequest createThreadDeathRequest() {
return new ThreadDeathRequestImpl();
}
示例9: threadDeathRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public List<ThreadDeathRequest> threadDeathRequests() {
return (List<ThreadDeathRequest>)unmodifiableRequestList(JDWP.EventKind.THREAD_DEATH);
}
示例10: F3ThreadDeathRequest
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public F3ThreadDeathRequest(F3VirtualMachine f3vm, ThreadDeathRequest underlying) {
super(f3vm, underlying);
}
示例11: underlying
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
@Override
protected ThreadDeathRequest underlying() {
return (ThreadDeathRequest) super.underlying();
}
示例12: threadDeathRequests
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public List<ThreadDeathRequest> threadDeathRequests() {
return F3EventRequest.wrapThreadDeathRequests(virtualMachine(),
underlying().threadDeathRequests());
}
示例13: wrap
import com.sun.jdi.request.ThreadDeathRequest; //导入依赖的package包/类
public static F3EventRequest wrap(F3VirtualMachine f3vm, EventRequest req) {
if (req == null) {
return null;
}
if (req instanceof AccessWatchpointRequest) {
return new F3AccessWatchpointRequest(f3vm, (AccessWatchpointRequest)req);
} else if (req instanceof BreakpointRequest) {
return new F3BreakpointRequest(f3vm, (BreakpointRequest)req);
} else if (req instanceof ClassPrepareRequest) {
return new F3ClassPrepareRequest(f3vm, (ClassPrepareRequest)req);
} else if (req instanceof ClassUnloadRequest) {
return new F3ClassUnloadRequest(f3vm, (ClassUnloadRequest)req);
} else if (req instanceof ExceptionRequest) {
return new F3ExceptionRequest(f3vm, (ExceptionRequest)req);
} else if (req instanceof MethodEntryRequest) {
return new F3MethodEntryRequest(f3vm, (MethodEntryRequest)req);
} else if (req instanceof MethodExitRequest) {
return new F3MethodExitRequest(f3vm, (MethodExitRequest)req);
} else if (req instanceof ModificationWatchpointRequest) {
return new F3ModificationWatchpointRequest(f3vm, (ModificationWatchpointRequest)req);
} else if (req instanceof MonitorContendedEnterRequest) {
return new F3MonitorContendedEnterRequest(f3vm, (MonitorContendedEnterRequest)req);
} else if (req instanceof MonitorContendedEnteredRequest) {
return new F3MonitorContendedEnteredRequest(f3vm, (MonitorContendedEnteredRequest)req);
} else if (req instanceof MonitorWaitRequest) {
return new F3MonitorWaitRequest(f3vm, (MonitorWaitRequest)req);
} else if (req instanceof MonitorWaitedRequest) {
return new F3MonitorWaitedRequest(f3vm, (MonitorWaitedRequest)req);
} else if (req instanceof StepRequest) {
return new F3StepRequest(f3vm, (StepRequest)req);
} else if (req instanceof ThreadDeathRequest) {
return new F3ThreadDeathRequest(f3vm, (ThreadDeathRequest)req);
} else if (req instanceof ThreadStartRequest) {
return new F3ThreadStartRequest(f3vm, (ThreadStartRequest)req);
} else if (req instanceof VMDeathRequest) {
return new F3VMDeathRequest(f3vm, (VMDeathRequest)req);
} else if (req instanceof WatchpointRequest) {
return new F3WatchpointRequest(f3vm, (WatchpointRequest)req);
} else {
return new F3EventRequest(f3vm, req);
}
}