Class DebugEvent
- All Implemented Interfaces:
Serializable
The following list defines the events generated for each debug model element.
The getSource()
method of a debug event returns the element
associated with the event. Creation events are guaranteed to occur in a top
down order - that is, parents are created before children. Termination events
are guaranteed to occur in a bottom up order - that is, children before
parents. However, termination events are not guaranteed for all elements that
are created. That is, terminate events can be coalesced - a terminate event
for a parent signals that all children have been terminated.
A debug model may define model specific events by specifying a debug event
kind of MODEL_SPECIFIC
. A model specific event is identified by
the event source (i.e. by the debug model that generated the event). The
detail of a model specific event is client defined. Note that model specific
events are not understood by the debug platform, and are thus ignored.
The generic CHANGE
event can be fired at any time by any
element. Generally, a client of a debug model, such as as a UI, can get
sufficient information to update by listening/responding to the other event
kinds. However, if a debug model needs to inform clients of a change that is
not specified by create/terminate/suspend/resume, the CHANGE
event may be used. For example, generally, the only way a thread or any of
its children can change state between a suspend and resume operation, is if
the thread or owning debug target is terminated. However, if a debug model
supports some other operation that would allow a debug element to change
state while suspended, the debug model would fire a change event for that
element. The valid detail codes for a change event are:
STATE
- indicates the state of an element has changed, but its children are not affected. A client would use a state change event to update a label of the affected element, but would not update any children.CONTENT
- indicates that a debug element's value or contents have changed in some way. For example, when the value of a variable is changed explicitly, the variable should fire a content change event.
IProcess
CREATE
- a process has been created and is executing.TERMINATE
- a process has terminated.
IDebugTarget
CREATE
- a debug target has been created and is ready to begin a debug session.TERMINATE
- a debug target has terminated and the debug session has ended.SUSPEND
- a debug target has suspended. Event detail provides the reason for the suspension:STEP_END
- a request to step has completedBREAKPOINT
- a breakpoint has been hitCLIENT_REQUEST
- a client request has caused the target to suspend (i.e. an explicit call tosuspend()
)UNSPECIFIED
- the reason for the suspend is not specified
RESUME
- a debug target has resumed. Event detail provides the reason for the resume:STEP_INTO
- a target is being resumed because of a request to step intoSTEP_OVER
- a target is being resumed because of a request to step overSTEP_RETURN
- a target is being resumed because of a request to step returnCLIENT_REQUEST
- a client request has caused the target to be resumed (i.e. an explicit call toresume()
)UNSPECIFIED
- The reason for the resume is not specified
IThread
CREATE
- a thread has been created in a debug target.TERMINATE
- a thread has terminated.SUSPEND
- a thread has suspended execution. Event detail provides the reason for the suspension:STEP_END
- a request to step has completedBREAKPOINT
- a breakpoint has been hitCLIENT_REQUEST
- a client request has caused the thread to suspend (i.e. an explicit call tosuspend()
)EVALUATION
- an expression evaluation has ended that may have had side effects in the debug target.EVALUATION_IMPLICIT
- an expression evaluation has ended that had no side effects in the debug target.UNSPECIFIED
- the reason for the suspend is not specified
RESUME
- a thread has resumed execution. Event detail provides the reason for the resume:STEP_INTO
- a thread is being resumed because of a request to step intoSTEP_OVER
- a thread is being resumed because of a request to step overSTEP_RETURN
- a thread is being resumed because of a request to step returnCLIENT_REQUEST
- a client request has caused the thread to be resumed (i.e. an explicit call toresume()
)EVALUATION
- an expression evaluation has started that may have side effects in the debug target.EVALUATION_IMPLICIT
- an expression evaluation has started that will have no side effects in the debug target.UNSPECIFIED
- The reason for the resume is not specified
IStackFrame
- no events are specified for stack frames. When a thread is suspended, it has stack frames. When a thread resumes, stack frames are unavailable.IVariable
- no events are specified for variables. When a thread is suspended, stack frames have variables. When a thread resumes, variables are unavailable.IValue
- no events are specified for values.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Breakpoint detail.static final int
Change event kind.static final int
Client request detail.static final int
Content change detail.static final int
Create event kind.static final int
Evaluation detail.static final int
Evaluation detail.static final int
Model specific event kind.static final int
Resume event kind.static final int
State change detail.static final int
Step end detail.static final int
Step start detail.static final int
Step start detail.static final int
Step start detail.static final int
Suspend event kind.static final int
Terminate event kind.static final int
Constant indicating that the kind or detail of a debug event is unspecified.Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionDebugEvent
(Object eventSource, int kind) Constructs a new debug event of the given kind with a detail code ofUNSPECIFIED
.DebugEvent
(Object eventSource, int kind, int detail) Constructs a new debug event of the given kind with the given detail. -
Method Summary
Modifier and TypeMethodDescriptiongetData()
Returns this event's application defined data, ornull
if noneint
Returns a constant describing extra detail about the event - either one of the detail constants defined by this class, possiblyUNSPECIFIED
, or a client defined detail if this is a model specific event.int
getKind()
Returns this event's kind - one of the kind constants defined by this class.boolean
Returns whether this event's detail indicates an evaluation.boolean
Returns whether this event's detail indicates the beginning of a step event.void
Sets this event's application defined data.toString()
Methods inherited from class java.util.EventObject
getSource
-
Field Details
-
RESUME
public static final int RESUMEResume event kind.- See Also:
-
SUSPEND
public static final int SUSPENDSuspend event kind.- See Also:
-
CREATE
public static final int CREATECreate event kind.- See Also:
-
TERMINATE
public static final int TERMINATETerminate event kind.- See Also:
-
CHANGE
public static final int CHANGEChange event kind.- See Also:
-
MODEL_SPECIFIC
public static final int MODEL_SPECIFICModel specific event kind. The detail codes for a model specific event are client defined.- Since:
- 2.1.2
- See Also:
-
STEP_INTO
public static final int STEP_INTOStep start detail. Indicates a thread was resumed by a step into action.- Since:
- 2.0
- See Also:
-
STEP_OVER
public static final int STEP_OVERStep start detail. Indicates a thread was resumed by a step over action.- Since:
- 2.0
- See Also:
-
STEP_RETURN
public static final int STEP_RETURNStep start detail. Indicates a thread was resumed by a step return action.- Since:
- 2.0
- See Also:
-
STEP_END
public static final int STEP_ENDStep end detail. Indicates a thread was suspended due to the completion of a step action.- See Also:
-
BREAKPOINT
public static final int BREAKPOINTBreakpoint detail. Indicates a thread was suspended by a breakpoint.- See Also:
-
CLIENT_REQUEST
public static final int CLIENT_REQUESTClient request detail. Indicates a thread was suspended due to a client request.- See Also:
-
EVALUATION
public static final int EVALUATIONEvaluation detail. Indicates that a thread was resumed or suspended to perform an expression evaluation.- Since:
- 2.0
- See Also:
-
EVALUATION_IMPLICIT
public static final int EVALUATION_IMPLICITEvaluation detail. Indicates that a thread was resumed or suspended to perform an implicit expression evaluation. An implicit evaluation is an evaluation that is performed as an indirect result of a user action. Clients may use this detail event to decide whether or not to alert the user that an evaluation is taking place..- Since:
- 2.0
- See Also:
-
STATE
public static final int STATEState change detail. Indicates the state of a single debug element has changed. Only valid forCHANGE
events.- Since:
- 2.0
- See Also:
-
CONTENT
public static final int CONTENTContent change detail. Indicates the content of a debug element (and potentially its children) has changed. Only valid forCHANGE
events.- Since:
- 2.0
- See Also:
-
UNSPECIFIED
public static final int UNSPECIFIEDConstant indicating that the kind or detail of a debug event is unspecified.- See Also:
-
-
Constructor Details
-
DebugEvent
Constructs a new debug event of the given kind with a detail code ofUNSPECIFIED
.- Parameters:
eventSource
- the object associated with the eventkind
- the kind of debug event (one of the kind constants defined by this class)
-
DebugEvent
Constructs a new debug event of the given kind with the given detail.- Parameters:
eventSource
- the object associated with the eventkind
- the kind of debug event (one of the kind constants defined by this class)detail
- extra information about the event (one of the detail constants defined by this class or a client defined detail if this is a model specific event)
-
-
Method Details
-
getDetail
public int getDetail()Returns a constant describing extra detail about the event - either one of the detail constants defined by this class, possiblyUNSPECIFIED
, or a client defined detail if this is a model specific event.- Returns:
- the detail code
-
getKind
public int getKind()Returns this event's kind - one of the kind constants defined by this class.- Returns:
- the kind code
-
isStepStart
public boolean isStepStart()Returns whether this event's detail indicates the beginning of a step event. This event's detail is one ofSTEP_INTO
,STEP_OVER
, orSTEP_RETURN
.- Returns:
- whether this event's detail indicates the beginning of a step event.
- Since:
- 2.0
-
isEvaluation
public boolean isEvaluation()Returns whether this event's detail indicates an evaluation. This event's detail is one ofEVALUATION
, orEVALUATION_IMPLICIT
.- Returns:
- whether this event's detail indicates an evaluation.
- Since:
- 2.0
-
setData
Sets this event's application defined data.- Parameters:
data
- application defined data- Since:
- 2.1.2
-
getData
Returns this event's application defined data, ornull
if none- Returns:
- application defined data, or
null
if none - Since:
- 2.1.2
-
toString
- Overrides:
toString
in classEventObject
- See Also:
-