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

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

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

org.netbeans.api.debugger.jpda
Class LineBreakpoint

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.LineBreakpoint

public class LineBreakpoint
extends JPDABreakpoint

Notifies about line breakpoint events.

How to use it:

    DebuggerManager.addBreakpoint (LineBreakpoint.create (
        "examples.texteditor.Ted",
        27
    ));
This breakpoint stops in Ted class on 27 line number.


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_CONDITION
          Property name constant.
static String PROP_INSTANCE_FILTERS
          Property name constant
static String PROP_LINE_NUMBER
          Property name constant
static String PROP_PREFERRED_CLASS_NAME
          Property name constant.
static String PROP_SOURCE_NAME
          Property name constant.
static String PROP_SOURCE_PATH
          Property name constant.
static String PROP_STRATUM
          Property name constant.
static String PROP_THREAD_FILTERS
          Property name constant
static String PROP_URL
          Property name 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 LineBreakpoint create(String url, int lineNumber)
          Creates a new breakpoint for given parameters.
 String getCondition()
          Returns condition.
 ObjectVariable[] getInstanceFilters(JPDADebugger session)
          Get the instance filter for a specific debugger session.
 int getLineNumber()
          Gets number of line to stop on.
 String getPreferredClassName()
          Gets the binary class name that is used to submit the breakpoint.
 String getSourceName()
          Returns the name of the source file.
 String getSourcePath()
          Returns source path, relative to the source root.
 String getStratum()
          Returns stratum.
 JPDAThread[] getThreadFilters(JPDADebugger session)
          Get the thread filter for a specific debugger session.
 String getURL()
          Gets the string representation of URL of the source file, which contains the class to stop on.
 void setCondition(String c)
          Sets condition.
 void setInstanceFilters(JPDADebugger session, ObjectVariable[] instances)
          Set the instance filter for a specific debugger session.
 void setLineNumber(int ln)
          Sets number of line to stop on.
 void setPreferredClassName(String className)
          Sets the binary class name that is used to submit the breakpoint.
 void setSourceName(String sn)
          Sets the name of the source file.
 void setSourcePath(String sp)
          Sets source path, relative to the source root.
 void setStratum(String s)
          Sets stratum.
 void setThreadFilters(JPDADebugger session, JPDAThread[] threads)
          Set the thread filter for a specific debugger session.
 void setURL(String url)
          Sets the string representation of URL of the source file, which contains the class to stop on.
 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_LINE_NUMBER

public static final String PROP_LINE_NUMBER
Property name constant

See Also:
Constant Field Values

PROP_URL

public static final String PROP_URL
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_SOURCE_NAME

public static final String PROP_SOURCE_NAME
Property name constant.

See Also:
Constant Field Values

PROP_SOURCE_PATH

public static final String PROP_SOURCE_PATH
Property name constant.

See Also:
Constant Field Values

PROP_STRATUM

public static final String PROP_STRATUM
Property name constant.

See Also:
Constant Field Values

PROP_PREFERRED_CLASS_NAME

public static final String PROP_PREFERRED_CLASS_NAME
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
Method Detail

create

public static LineBreakpoint create(String url,
                                    int lineNumber)
Creates a new breakpoint for given parameters.

Parameters:
url - a string representation of URL of the source file
lineNumber - a line number
Returns:
a new breakpoint for given parameters

getURL

public String getURL()
Gets the string representation of URL of the source file, which contains the class to stop on.

Returns:
name of class to stop on

setURL

public void setURL(String url)
Sets the string representation of URL of the source file, which contains the class to stop on.

Parameters:
url - the URL of class to stop on

getLineNumber

public int getLineNumber()
Gets number of line to stop on.

Returns:
line number to stop on

setLineNumber

public void setLineNumber(int ln)
Sets number of line to stop on.

Parameters:
ln - a line number to stop on

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.

getCondition

public String getCondition()
Returns condition.

Returns:
cond a condition

setCondition

public void setCondition(String c)
Sets condition.

Parameters:
c - a new condition

getStratum

public String getStratum()
Returns stratum.

Returns:
a stratum

setStratum

public void setStratum(String s)
Sets stratum.

Parameters:
s - a new stratum

getSourceName

public String getSourceName()
Returns the name of the source file.

Returns:
a source name or null when no source name is defined.

setSourceName

public void setSourceName(String sn)
Sets the name of the source file.

Parameters:
sn - a new source name or null.

getSourcePath

public String getSourcePath()
Returns source path, relative to the source root.

Returns:
a source path or null when no source path is defined.
Since:
1.3

setSourcePath

public void setSourcePath(String sp)
Sets source path, relative to the source root.

Parameters:
sp - a new source path or null
Since:
1.3

setPreferredClassName

public void setPreferredClassName(String className)
Sets the binary class name that is used to submit the breakpoint.

Parameters:
className - The binary class name, or null if the class name should be retrieved automatically from the URL and line number.
Since:
2.8

getPreferredClassName

public String getPreferredClassName()
Gets the binary class name that is used to submit the breakpoint.

Returns:
The binary class name, if previously set by setPreferedClassName method, or null if the class name should be retrieved automatically from the URL and line number.
Since:
2.8

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.