com.bluemarsh.jswat.breakpoint
Class ExceptionBreakpoint

java.lang.Object
  |
  +--com.bluemarsh.jswat.breakpoint.DefaultBreakpoint
        |
        +--com.bluemarsh.jswat.breakpoint.ResolvableBreakpoint
              |
              +--com.bluemarsh.jswat.breakpoint.ExceptionBreakpoint
All Implemented Interfaces:
Breakpoint, java.util.EventListener, java.io.Serializable, VMEventListener

public class ExceptionBreakpoint
extends ResolvableBreakpoint

Class ExceptionBreakpoint implements the Breakpoint interface. Its only property is the name of an exception class. It halts execution of the debuggee VM whenever an exception of the given type (or subtype) has been thrown. This includes caught and uncaught exceptions.

Author:
Nathan Fiedler
See Also:
Serialized Form

Fields inherited from class com.bluemarsh.jswat.breakpoint.ResolvableBreakpoint
eventRequest, prepareRequest, referenceSpec
 
Fields inherited from class com.bluemarsh.jswat.breakpoint.DefaultBreakpoint
breakpointGroup, classFilters, conditionList, deleteOnExpire, expireCount, isEnabled, logCategory, monitorList, propertyList, skipCount, stoppedCount, suspendPolicy, threadFilters
 
Fields inherited from interface com.bluemarsh.jswat.breakpoint.Breakpoint
serialVersionUID
 
Fields inherited from interface com.bluemarsh.jswat.event.VMEventListener
PRIORITY_BREAKPOINT, PRIORITY_DEFAULT, PRIORITY_HIGH, PRIORITY_HIGHEST, PRIORITY_LOW, PRIORITY_LOWEST, PRIORITY_SESSION
 
Method Summary
protected  com.sun.jdi.request.EventRequest createEventRequest(com.sun.jdi.ReferenceType refType)
          Create the method entry and exit event requests.
 void destroy()
          Tear down this breakpoint in preparation for deletion.
 BreakpointUI getUIAdapter()
          Returns the user interface widget for customizing this breakpoint.
 void init()
          Initialize the breakpoint so it may operate normally.
protected  boolean performStop(com.sun.jdi.event.Event e)
          This breakpoint has caused the debuggee VM to stop.
protected  com.sun.jdi.request.EventRequest resolveReference(com.sun.jdi.ReferenceType refType)
          Resolve against the given ReferenceType.
 void setEnabled(boolean enabled)
          Enables or disables this breakpoint, according to the parameter.
 java.lang.String toString()
          Returns a String representation of this.
 java.lang.String toString(boolean terse)
          Returns a String representation of this.
 
Methods inherited from class com.bluemarsh.jswat.breakpoint.ResolvableBreakpoint
deleteEventRequest, eventRequest, getReferenceTypeSpec, isResolved, reset, resolveAgainstEvent, resolveEagerly, setSuspendPolicy
 
Methods inherited from class com.bluemarsh.jswat.breakpoint.DefaultBreakpoint
addCondition, addMonitor, conditions, deleteOnExpire, eventOccurred, fireChange, getBreakpointGroup, getBreakpointManager, getClassFilters, getExpireCount, getProperty, getSkipCount, getSuspendPolicy, getThreadFilters, hasExpired, incrementStoppedCount, isEnabled, isSkipping, monitors, removeCondition, removeMonitor, setBreakpointGroup, setClassFilters, setExpireCount, setProperty, setSkipCount, setThreadFilters, shouldResume
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

createEventRequest

protected com.sun.jdi.request.EventRequest createEventRequest(com.sun.jdi.ReferenceType refType)
Create the method entry and exit event requests. If a request has already been created, it will be deleted and a new one will be made.
Parameters:
refType - exception to catch.
Returns:
newly created event request.

destroy

public void destroy()
Tear down this breakpoint in preparation for deletion.
Overrides:
destroy in class ResolvableBreakpoint

getUIAdapter

public BreakpointUI getUIAdapter()
Returns the user interface widget for customizing this breakpoint.
Overrides:
getUIAdapter in class DefaultBreakpoint
Returns:
Breakpoint user interface adapter.

init

public void init()
Initialize the breakpoint so it may operate normally.
Overrides:
init in class DefaultBreakpoint

performStop

protected boolean performStop(com.sun.jdi.event.Event e)
This breakpoint has caused the debuggee VM to stop. Increment any breakpoint counters and execute all monitors associated with this breakpoint.
Overrides:
performStop in class DefaultBreakpoint
Parameters:
e - Event for which we are stopping.
Returns:
true if VM should resume, false otherwise.

resolveReference

protected com.sun.jdi.request.EventRequest resolveReference(com.sun.jdi.ReferenceType refType)
                                                     throws ResolveException
Resolve against the given ReferenceType. If successful, return the new event request.
Overrides:
resolveReference in class ResolvableBreakpoint
Parameters:
refType - ReferenceType against which to resolve.
Returns:
event request, or null if not resolved.
Throws:
ResolveException - Thrown if breakpoint resolve fails.

setEnabled

public void setEnabled(boolean enabled)
Enables or disables this breakpoint, according to the parameter. This only affects the breakpint itself. If the breakpoint group containing this breakpoint is disabled, this breakpoint will remain effectively disabled.
Overrides:
setEnabled in class ResolvableBreakpoint
Parameters:
enabled - true if breakpoint should be enabled, false if breakpoint should be disabled.
See Also:
DefaultBreakpoint.isEnabled

toString

public java.lang.String toString()
Returns a String representation of this.
Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(boolean terse)
Returns a String representation of this.
Parameters:
terse - true to keep the description terse.