com.bluemarsh.jswat.breakpoint
Class MethodBreakpoint

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

public class MethodBreakpoint
extends LocationBreakpoint

Class MethodBreakpoint extends the LocationBreakpoint class. Its properties include a class and a method name, and an argument list specifying where the breakpoint should stop.

Author:
Nathan Fiedler
See Also:
Serialized Form

Field Summary
protected  java.util.List methodArgs
          List of method arguments (if any are given), where each element is a String object reprepsenting the argument type in the JNI-style signature.
protected  java.lang.String methodId
          Name of the method this breakpoint is set at.
 
Fields inherited from class com.bluemarsh.jswat.breakpoint.LocationBreakpoint
lineNumber
 
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
 java.util.List getMethodArgs()
          Retrieve the arguments to the method at which this breakpoint is set.
 java.lang.String getMethodName()
          Retrieve the method name associated with this breakpoint.
 BreakpointUI getUIAdapter()
          Returns the user interface widget for customizing this breakpoint.
protected  com.sun.jdi.Location resolveLocation(com.sun.jdi.ClassType clazz)
          Determine the location at which to set the breakpoint using the given class type.
 void setMethodArgs(java.util.List args)
          Set the list of arguments to the method at which this breakpoint is set.
 void setMethodName(java.lang.String name)
          Set the method name associated with this breakpoint.
 java.lang.String toString(boolean terse)
          Returns a String representation of this.
 
Methods inherited from class com.bluemarsh.jswat.breakpoint.LocationBreakpoint
createEventRequest, destroy, getClassName, getLineNumber, getLocation, init, resolveReference, setEnabled, toString
 
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, performStop, 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
 

Field Detail

methodId

protected java.lang.String methodId
Name of the method this breakpoint is set at.

methodArgs

protected java.util.List methodArgs
List of method arguments (if any are given), where each element is a String object reprepsenting the argument type in the JNI-style signature.
Method Detail

getMethodArgs

public java.util.List getMethodArgs()
Retrieve the arguments to the method at which this breakpoint is set. The returned list is unmodifiable.
Returns:
list of method arguments.

getMethodName

public java.lang.String getMethodName()
Retrieve the method name associated with this breakpoint.
Returns:
name of method this breakpoint is set to.

getUIAdapter

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

resolveLocation

protected com.sun.jdi.Location resolveLocation(com.sun.jdi.ClassType clazz)
                                        throws ResolveException
Determine the location at which to set the breakpoint using the given class type.
Overrides:
resolveLocation in class LocationBreakpoint
Parameters:
clazz - ClassType against which to resolve.
Returns:
Location at which to create breakpoint.

setMethodArgs

public void setMethodArgs(java.util.List args)
Set the list of arguments to the method at which this breakpoint is set. The list is made unmodifiable via the Collections class.
Parameters:
args - method argument list.

setMethodName

public void setMethodName(java.lang.String name)
Set the method name associated with this breakpoint.
Parameters:
name - name of method this breakpoint is set to.

toString

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