org.openide.debugger
Class Breakpoint

java.lang.Object
  |
  +--org.openide.debugger.Breakpoint
All Implemented Interfaces:
Serializable

public abstract class Breakpoint
extends Object
implements Serializable

Represents one breakpoint. Breakpoints are created and returned by the Debugger implementation. A breakpoint may be assigned either to a source line of a class, or to a method (or constructor) of a class. The current set of breakpoints is stored in the implementation of Debugger.

The abstract class contains only the necessary manipulation methods used by the IDE, like enabling/disabling the breakpoint and obtaining its position. A good implementation can offer the user much better ways to deal with the breakpoint (conditional breakpoints, etc.). Such information should be presented as properties--so it is assumed that the breakpoint itself is a serializable JavaBean.

See Also:
Serialized Form

Field Summary
static String PROP_ENABLED
          Property name for enabled status of the breakpoint.
static String PROP_VALID
          Property name for validity of the breakpoint.
 
Constructor Summary
Breakpoint()
           
 
Method Summary
abstract  void addPropertyChangeListener(PropertyChangeListener listener)
          Add a property change listener.
abstract  String getClassName()
          Get the name of the class the breakpoint is in.
abstract  Line getLine()
          Get the line assigned to the breakpoint.
abstract  ConstructorElement getMethod()
          Get the method the breakpoint is in.
abstract  boolean isEnabled()
          Test whether the breakpoint is enabled.
abstract  boolean isHidden()
          Test whether the breakpoint is hidden.
abstract  boolean isValid()
          Test whether the breakpoint is valid.
abstract  void remove()
          Destroy this breakpoint.
abstract  void removePropertyChangeListener(PropertyChangeListener listener)
          Remove a property change listener.
abstract  void setEnabled(boolean enabled)
          Set whether the breakpoint is enabled.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_VALID

public static final String PROP_VALID
Property name for validity of the breakpoint.

PROP_ENABLED

public static final String PROP_ENABLED
Property name for enabled status of the breakpoint.
Constructor Detail

Breakpoint

public Breakpoint()
Method Detail

remove

public abstract void remove()
Destroy this breakpoint. Removes it from the list of all breakpoints in the system.

getLine

public abstract Line getLine()
Get the line assigned to the breakpoint.
Returns:
the source line or null if no line is specified (it is assigned to a method)

getClassName

public abstract String getClassName()
Get the name of the class the breakpoint is in.
Returns:
the class name

getMethod

public abstract ConstructorElement getMethod()
Get the method the breakpoint is in.
Returns:
the method (or constructor) element or null if it assigned to a line

isEnabled

public abstract boolean isEnabled()
Test whether the breakpoint is enabled.
Returns:
true if so

setEnabled

public abstract void setEnabled(boolean enabled)
Set whether the breakpoint is enabled.
Parameters:
state - true to enable, false to disable

isValid

public abstract boolean isValid()
Test whether the breakpoint is valid. Invalidity might be caused by an inability to find the class it is supposed to be in, for example.
Returns:
true if it is valid

isHidden

public abstract boolean isHidden()
Test whether the breakpoint is hidden. If so, it is not presented in the list of all breakpoints. Such a breakpoint can be used for the IDE's (or some module's) private use, not displaying anything to the user.
Returns:
true if the breakpoint is hidden

addPropertyChangeListener

public abstract void addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener.
Parameters:
listener - the listener to add

removePropertyChangeListener

public abstract void removePropertyChangeListener(PropertyChangeListener listener)
Remove a property change listener.
Parameters:
listener - the listener to remove


Built on December 12 2001.  |  Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.