站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

MethodBreakpoint (JPDA Debugger API) - NetBeans API Javadoc (Current Development Version)

org.netbeans.api.debugger.jpda/2 2.13

org.netbeans.api.debugger.jpda
Class MethodBreakpoint

java.lang.Object
  extended by org.netbeans.api.debugger.Breakpoint
      extended by org.netbeans.api.debugger.jpda.JPDABreakpoint
          extended by org.netbeans.api.debugger.jpda.MethodBreakpoint

public class MethodBreakpoint
extends JPDABreakpoint

Notifies about method entry events.

How to use it:

    DebuggerManager.addBreakpoint (MethodBreakpoint.create (
        "examples.texteditor.Ted*",
        "
    ));
This breakpoint stops when some initializer of class Ted or innercalsses is called.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.netbeans.api.debugger.Breakpoint
Breakpoint.HIT_COUNT_FILTERING_STYLE, Breakpoint.VALIDITY
 
Field Summary
static String PROP_BREAKPOINT_TYPE
          Property name constant.
static String PROP_CLASS_EXCLUSION_FILTERS
          Property name constant
static String PROP_CLASS_FILTERS
          Property name constant
static String PROP_CONDITION
          Property name constant.
static String PROP_INSTANCE_FILTERS
          Property name constant
static String PROP_METHOD_NAME
          Property name constant
static String PROP_METHOD_SIGNATURE
          Property name constant
static String PROP_THREAD_FILTERS
          Property name constant
static int TYPE_METHOD_ENTRY
          Breakpoint type property value constant.
static int TYPE_METHOD_EXIT
          Breakpoint type property value constant.
 
Fields inherited from class org.netbeans.api.debugger.jpda.JPDABreakpoint
PROP_HIDDEN, PROP_PRINT_TEXT, PROP_SUSPEND, SUSPEND_ALL, SUSPEND_EVENT_THREAD, SUSPEND_NONE
 
Fields inherited from class org.netbeans.api.debugger.Breakpoint
PROP_DISPOSED, PROP_ENABLED, PROP_GROUP_NAME, PROP_HIT_COUNT_FILTER, PROP_VALIDITY
 
Method Summary
static MethodBreakpoint create()
          Creates a new method breakpoint.
static MethodBreakpoint create(String className, String methodName)
          Creates a new method breakpoint for given parameters.
 int getBreakpointType()
          Returns type of this breakpoint.
 String[] getClassExclusionFilters()
          Get list of class exclusion filters to stop on.
 String[] getClassFilters()
          Get list of class filters to stop on.
 String getCondition()
          Returns condition.
 ObjectVariable[] getInstanceFilters(JPDADebugger session)
          Get the instance filter for a specific debugger session.
 String getMethodName()
          Get name of method to stop on.
 String getMethodSignature()
          Get the JNI-style signature of the method to stop on.
 JPDAThread[] getThreadFilters(JPDADebugger session)
          Get the thread filter for a specific debugger session.
 void setBreakpointType(int breakpointType)
          Sets type of this breakpoint (TYPE_METHOD_ENTRY or TYPE_METHOD_EXIT).
 void setClassExclusionFilters(String[] classExclusionFilters)
          Set list of class exclusion filters to stop on.
 void setClassFilters(String[] classFilters)
          Set list of class filters to stop on.
 void setCondition(String cond)
          Sets condition.
 void setInstanceFilters(JPDADebugger session, ObjectVariable[] instances)
          Set the instance filter for a specific debugger session.
 void setMethodName(String mn)
          Set name of method to stop on.
 void setMethodSignature(String signature)
          Set JNI-style signature of the method to stop on.
 void setThreadFilters(JPDADebugger session, JPDAThread[] threads)
          Set the thread filter for a specific debugger session.
 String toString()
          Returns a string representation of this object.
 
Methods inherited from class org.netbeans.api.debugger.jpda.JPDABreakpoint
addJPDABreakpointListener, disable, enable, getPrintText, getSuspend, isEnabled, isHidden, removeJPDABreakpointListener, setHidden, setPrintText, setSuspend
 
Methods inherited from class org.netbeans.api.debugger.Breakpoint
addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, getGroupName, getHitCountFilter, getHitCountFilteringStyle, getValidity, getValidityMessage, removePropertyChangeListener, removePropertyChangeListener, setGroupName, setHitCountFilter, setValidity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROP_METHOD_NAME

public static final String PROP_METHOD_NAME
Property name constant

See Also:
Constant Field Values

PROP_METHOD_SIGNATURE

public static final String PROP_METHOD_SIGNATURE
Property name constant

See Also:
Constant Field Values

PROP_BREAKPOINT_TYPE

public static final String PROP_BREAKPOINT_TYPE
Property name constant.

See Also:
Constant Field Values

PROP_CONDITION

public static final String PROP_CONDITION
Property name constant.

See Also:
Constant Field Values

PROP_CLASS_FILTERS

public static final String PROP_CLASS_FILTERS
Property name constant

See Also:
Constant Field Values

PROP_CLASS_EXCLUSION_FILTERS

public static final String PROP_CLASS_EXCLUSION_FILTERS
Property name constant

See Also:
Constant Field Values

PROP_INSTANCE_FILTERS

public static final String PROP_INSTANCE_FILTERS
Property name constant

See Also:
Constant Field Values

PROP_THREAD_FILTERS

public static final String PROP_THREAD_FILTERS
Property name constant

See Also:
Constant Field Values

TYPE_METHOD_ENTRY

public static final int TYPE_METHOD_ENTRY
Breakpoint type property value constant.

See Also:
Constant Field Values

TYPE_METHOD_EXIT

public static final int TYPE_METHOD_EXIT
Breakpoint type property value constant.

See Also:
Constant Field Values
Method Detail

create

public static MethodBreakpoint create(String className,
                                      String methodName)
Creates a new method breakpoint for given parameters.

Parameters:
className - a class name filter
methodName - a name of method
Returns:
a new breakpoint for given parameters

create

public static MethodBreakpoint create()
Creates a new method breakpoint.

Returns:
a new method breakpoint

getMethodName

public String getMethodName()
Get name of method to stop on.

Returns:
name of method to stop on

setMethodName

public void setMethodName(String mn)
Set name of method to stop on.

Parameters:
mn - a name of method to stop on

getMethodSignature

public String getMethodSignature()
Get the JNI-style signature of the method to stop on.

Returns:
JNI-style signature of the method to stop on
See Also:
TypeComponent.signature()

setMethodSignature

public void setMethodSignature(String signature)
Set JNI-style signature of the method to stop on.

Parameters:
signature - the JNI-style signature of the method to stop on
See Also:
TypeComponent.signature()

getCondition

public String getCondition()
Returns condition.

Returns:
cond a condition

setCondition

public void setCondition(String cond)
Sets condition.

Parameters:
cond - a c new condition

getBreakpointType

public int getBreakpointType()
Returns type of this breakpoint.

Returns:
type of this breakpoint

setBreakpointType

public void setBreakpointType(int breakpointType)
Sets type of this breakpoint (TYPE_METHOD_ENTRY or TYPE_METHOD_EXIT).

Parameters:
breakpointType - a new value of breakpoint type property

getClassFilters

public String[] getClassFilters()
Get list of class filters to stop on.

Returns:
list of class filters to stop on

setClassFilters

public void setClassFilters(String[] classFilters)
Set list of class filters to stop on.

Parameters:
classFilters - a new value of class filters property

getClassExclusionFilters

public String[] getClassExclusionFilters()
Get list of class exclusion filters to stop on.

Returns:
list of class exclusion filters to stop on

setClassExclusionFilters

public void setClassExclusionFilters(String[] classExclusionFilters)
Set list of class exclusion filters to stop on.

Parameters:
classExclusionFilters - a new value of class exclusion filters property

getInstanceFilters

public ObjectVariable[] getInstanceFilters(JPDADebugger session)
Get the instance filter for a specific debugger session.

Returns:
The instances or null when there is no instance restriction.

setInstanceFilters

public void setInstanceFilters(JPDADebugger session,
                               ObjectVariable[] instances)
Set the instance filter for a specific debugger session. This restricts the breakpoint to specific instances in that session.

Parameters:
session - the debugger session
instances - the object instances or null to unset the filter.

getThreadFilters

public JPDAThread[] getThreadFilters(JPDADebugger session)
Get the thread filter for a specific debugger session.

Returns:
The thread or null when there is no thread restriction.

setThreadFilters

public void setThreadFilters(JPDADebugger session,
                             JPDAThread[] threads)
Set the thread filter for a specific debugger session. This restricts the breakpoint to specific threads in that session.

Parameters:
session - the debugger session
threads - the threads or null to unset the filter.

toString

public String toString()
Returns a string representation of this object.

Overrides:
toString in class Object
Returns:
a string representation of the object

org.netbeans.api.debugger.jpda/2 2.13

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.