DefaultBreakpoint Class
- public abstract class DefaultBreakpoint
extends Object
implements IDebugBreakPoint
This is the base implementation of a breakpoint. It deals with some of the basic
bookkeeping for breakpoints, but leaves all the specifics of dealing with
particular kinds of breakpoints (like line, method, or exception breakpoints)
to subclasses.
-
Hierarchy
-
Object
DefaultBreakpoint
-
All Implemented Interfaces
-
IDebugBreakPoint
, Serializable
-
Direct Known Subclasses
-
SourceBreakpoint
protected boolean |
-
_fDisabled
- Keeps track of whether the breakpoint is enabled or disabled.
|
protected transient int |
-
_id
- Keeps track of the breakpoint id, whicih is unique across the IDE and the proxy.
|
protected transient String |
-
_message
- Don't need to remember error messages across debugging sessions
|
protected TreeMap |
-
_properties
- Keeps track of arbitrary breakpoint properties.
|
protected transient PropertyChangeSupport |
-
_propertyChangeSupport
- Listeners will have to re-register themselves if breakpoints are unserialized
|
public void |
-
clearBreakpoint (IDebugBreakPoint.IBreakpointContext dbgCmds)
- This is called to have the Breakpoint clear itself with the proxy.
|
public void |
-
disable (boolean fDisable, IDebugBreakPoint.IBreakpointContext bpCtx)
- This will either disable or re-enable a breakpoint, depending on the value of
fDisable .
|
public String |
-
getErrorMessage ()
- Error messages indicate something went wrong with the breakpoint, like the
evaluation of the conditional expression did not result in a boolean
|
public int |
-
getId ()
- This Unique ID will be used to keep breakpoints in the IDE in sync with breakpoints in the proxy
|
public synchronized Map |
-
getProperties ()
- This method gets a list of the breakpoint's properties.
|
public synchronized String |
-
getProperty (Integer prop)
- This method sets a property on the breakpoint.
|
public boolean |
-
isDisabled ()
- This will return whether the breakpoint is enabled or disabled.
|
public boolean |
-
isValid ()
- The breakpoint is not valid if it is known to be on a line that cannot be hit
when debugging.
|
public void |
-
setErrorMessage (String message)
- Sets the error message describing why a breakpoint could not be set.
|
public void |
-
setId (int i)
- This Unique ID will be used to keep breakpoints in the IDE in sync with breakpoints in the proxy
|
public synchronized void |
-
setProperties (Map props)
- This method will add a set of properties to the breakpoint.
|
public synchronized String |
-
setProperty (Integer prop, String val)
- This method sets a property on a breakpoint.
|
public synchronized boolean |
-
supportsProperty (Integer prop)
- This method returns whether a breakpoint supports a given property or not.
|
public abstract String |
-
toString ()
- Forces all Breakpoints to override
toString .
|
Methods from interface com.bea.ide.debug.IDebugBreakPoint |
breakpointHit , clearBreakpoint , disable , getErrorMessage , getId , getProperties , getProperty , isDisabled , isValid , setErrorMessage , setId , setProperties , setProperty , supportsProperty , syncBreakpoint
|
_fDisabled
protected boolean _fDisabled
- Keeps track of whether the breakpoint is enabled or disabled.
_id
protected transient int _id
- Keeps track of the breakpoint id, whicih is unique across the IDE and the proxy.
This id is only unique for a debugging session, and will never be persisted with the
breakpoint.
_message
protected transient String
_message
- Don't need to remember error messages across debugging sessions
_properties
protected TreeMap
_properties
- Keeps track of arbitrary breakpoint properties. This is where properties such as breakpoint condition
are stored.
_propertyChangeSupport
protected transient PropertyChangeSupport
_propertyChangeSupport
- Listeners will have to re-register themselves if breakpoints are unserialized
DefaultBreakpoint
protected DefaultBreakpoint()
- Constructor for a
DefaultBreakpoint
.
clearBreakpoint(IDebugBreakPoint.IBreakpointContext) Method
public void clearBreakpoint(IDebugBreakPoint.IBreakpointContext
dbgCmds)
throws DebugTransportException
Description copied from IDebugBreakPoint.clearBreakpoint(IDebugBreakPoint.IBreakpointContext)
This is called to have the Breakpoint clear itself with the proxy. This function
will be called when a breakpoint in being removed.
Parameters
-
dbgCmds
- this is an
IDebugBreakPoint.IBreakpointContext
object that provides
the context needed to be the breakpoint to communicate with the target VM.
Exceptions
-
DebugTransportException
disable(boolean, IDebugBreakPoint.IBreakpointContext) Method
public void disable(boolean fDisable,
IDebugBreakPoint.IBreakpointContext
bpCtx)
throws DebugTransportException
Description copied from IDebugBreakPoint.disable(boolean, IDebugBreakPoint.IBreakpointContext)
This will either disable or re-enable a breakpoint, depending on the value of fDisable
.
This method is also responsible for sending a message to the proxy telling it whether or
not to pay attention to this breakpoint. This is only really called by the IDebugClient
,
anywhere else that wants to enable or disable a breakpoint should call disableBreakpoint on
IDebugClient
.
Parameters
-
fDisable
- this is an
IDebugBreakPoint.IBreakpointContext
object that provides
the context needed to be the breakpoint to communicate with the target VM.
Exceptions
-
DebugTransportException
getErrorMessage() Method
public String
getErrorMessage()
Description copied from IDebugBreakPoint.getErrorMessage()
Error messages indicate something went wrong with the breakpoint, like the
evaluation of the conditional expression did not result in a boolean
Returns
- if set, message from debugger regarding the status of the breakpoint, null otherwise
getId() Method
public int getId()
This Unique ID will be used to keep breakpoints in the IDE in sync with breakpoints in the proxy
Returns
- the unique id that will be used for this breakpoint durring the debugging session.
getProperties() Method
public synchronized Map
getProperties()
Description copied from IDebugBreakPoint.getProperties()
This method gets a list of the breakpoint's properties.
Returns
- gets the entire
Map
of properties set on this breakpoint.
getProperty(Integer) Method
public synchronized String
getProperty(Integer
prop)
This method sets a property on the breakpoint.
Parameters
-
prop
- the value for the property you want, e.g.
IDebugBreakPoint.BP_PROP_CONDITION
.
Returns
- the property value you are looking for, or
null
if one
is not present.
isDisabled() Method
public boolean isDisabled()
This will return whether the breakpoint is enabled or disabled.
Returns
- true - if the breakpoint is disabled
false - if the breakpoint is enabled.
isValid() Method
public boolean isValid()
Description copied from IDebugBreakPoint.isValid()
The breakpoint is not valid if it is known to be on a line that cannot be hit
when debugging. There are lines that will not be hit, but we cannot currently detect.
Returns
- true if the breakpoint thinks it is on a valid line
false if the breakpoint knows it is not on a valid line.
setErrorMessage(String) Method
public void setErrorMessage(String
message)
Description copied from IDebugBreakPoint.setErrorMessage(String)
Sets the error message describing why a breakpoint could not be set.
Parameters
-
message
- message from debugger, if any, regarding the status of the breakpoint. May be null.
setId(int) Method
public void setId(int i)
This Unique ID will be used to keep breakpoints in the IDE in sync with breakpoints in the proxy
Parameters
-
i
- the unique id that will be used for this breakpoint durring the debugging session.
setProperties(Map) Method
public synchronized void setProperties(Map
props)
Description copied from IDebugBreakPoint.setProperties(Map)
This method will add a set of properties to the breakpoint. If any of the properties
already exist, this will override them.
Parameters
-
props
- the entire
Map
of properties to set on this breakpoint.
setProperty(Integer, String) Method
public synchronized String
setProperty(Integer
prop,
String
val)
This method sets a property on a breakpoint.
Parameters
-
prop
- the value for the property you want to set, e.g.
IDebugBreakPoint.BP_PROP_CONDITION
.
-
val
- the new value for this property.
Returns
- the property replaced, or
null
if there was no previous value.
supportsProperty(Integer) Method
public synchronized boolean supportsProperty(Integer
prop)
This method returns whether a breakpoint supports a given property or not.
The default implementation always returns false
. Subclasses
may add support for whatever properties they like.
Parameters
-
prop
- the value for the property you want, e.g.
IDebugBreakPoint.BP_PROP_CONDITION
.
Returns
- true if this breakpoint supports this property
false if this breakpoint does not support this property.
toString() Method
public abstract String
toString()
Forces all Breakpoints to override toString
.
-
Overrides
-
Object.toString()
Returns
- something reasonable for the breakpoint view to display