1 19 20 package org.netbeans.api.debugger.jpda; 21 22 23 35 public final class ThreadBreakpoint extends JPDABreakpoint { 36 37 38 public static final String PROP_BREAKPOINT_TYPE = "breakpointtType"; 40 41 public static final int TYPE_THREAD_STARTED = 1; 42 43 public static final int TYPE_THREAD_DEATH = 2; 44 45 public static final int TYPE_THREAD_STARTED_OR_DEATH = 3; 46 47 48 private int breakpointType = TYPE_THREAD_STARTED; 49 50 51 private ThreadBreakpoint () { 52 } 53 54 59 public static ThreadBreakpoint create () { 60 return new ThreadBreakpoint (); 61 } 62 63 68 public int getBreakpointType () { 69 return breakpointType; 70 } 71 72 77 public void setBreakpointType (int breakpointType) { 78 if (breakpointType == this.breakpointType) return; 79 if ((breakpointType & (TYPE_THREAD_STARTED | TYPE_THREAD_DEATH)) == 0) 80 throw new IllegalArgumentException (); 81 int old = this.breakpointType; 82 this.breakpointType = breakpointType; 83 firePropertyChange (PROP_BREAKPOINT_TYPE, new Integer (old), new Integer (breakpointType)); 84 } 85 86 91 public String toString () { 92 return "ThreadBreakpoint " + breakpointType; 93 } 94 } 95 | Popular Tags |