ClassPrepareRequest cpr = mgr.createClassPrepareRequest();
cpr.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
cpr.addClassFilter(clazz);
cpr.enable();
EventRequest req= mgr.createClassUnloadRequest();
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
((ClassUnloadRequest)req).addClassFilter(clazz);
req.setEnabled(true);
//TODO NO repertir request usar uno para todas las clases
req = mgr.createMonitorContendedEnteredRequest();
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
((MonitorContendedEnteredRequest)req).addClassFilter(clazz);
req.setEnabled(true);
req = mgr.createMonitorContendedEnterRequest();
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
((MonitorContendedEnterRequest)req).addClassFilter(clazz);
req.setEnabled(true);
req = mgr.createMonitorWaitedRequest();
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
((MonitorWaitedRequest)req).addClassFilter(clazz);
req.setEnabled(true);
req = mgr.createMonitorWaitRequest();
req.setSuspendPolicy(EventRequest.SUSPEND_EVENT_THREAD);
((MonitorWaitRequest)req).addClassFilter(clazz);
req.setEnabled(true);
}
if(traceFilter.isTraceThreads())
{
//inspeccions creacion hilos