1 19 20 package org.netbeans.modules.debugger.jpda.breakpoints; 21 22 import com.sun.jdi.event.ClassPrepareEvent; 23 import com.sun.jdi.event.Event; 24 25 import org.netbeans.api.debugger.Session; 26 import org.netbeans.api.debugger.jpda.ClassLoadUnloadBreakpoint; 27 import org.netbeans.modules.debugger.jpda.JPDADebuggerImpl; 28 29 34 public class ClassBreakpointImpl extends ClassBasedBreakpoint { 35 36 private ClassLoadUnloadBreakpoint breakpoint; 37 38 39 public ClassBreakpointImpl ( 40 ClassLoadUnloadBreakpoint breakpoint, 41 JPDADebuggerImpl debugger, 42 Session session 43 ) { 44 super (breakpoint, debugger, session); 45 this.breakpoint = breakpoint; 46 set (); 47 } 48 49 protected void setRequests () { 50 setClassRequests ( 51 breakpoint.getClassFilters (), 52 breakpoint.getClassExclusionFilters (), 53 breakpoint.getBreakpointType () 54 ); 55 } 56 57 public boolean exec (Event event) { 58 if (event instanceof ClassPrepareEvent) 59 try { 60 return perform ( 61 null, 62 ((ClassPrepareEvent) event).thread (), 63 ((ClassPrepareEvent) event).referenceType (), 64 ((ClassPrepareEvent) event).referenceType ().classObject () 65 ); 66 } catch (UnsupportedOperationException ex) { 67 return perform ( 70 null, 71 ((ClassPrepareEvent) event).thread (), 72 ((ClassPrepareEvent) event).referenceType (), 73 null 74 ); 75 } 76 else 77 return perform ( 78 null, 79 null, 80 null, 81 null 82 ); 83 } 84 } 85 86 | Popular Tags |