|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BranchEventListener
A branch event listener is notified by an event dispatcher each time a branch is executed.
Method Summary | |
---|---|
void |
callBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that a call branch was executed. |
void |
commitEventStream(int streamId)
Notification that a branch event stream has completed. |
void |
entryBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that an entry branch was executed. |
void |
ifBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that an if branch was executed. |
void |
initialize()
Initializes the event listener. |
void |
methodEnterEvent(java.lang.String classAndSignature,
int branchCount)
Notification that a new method has been entered. |
void |
newEventStream(int streamId)
Notification that a new branch event stream is starting. |
void |
otherBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that a summary branch was executed. |
void |
switchBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that a switch branch was executed. |
void |
throwBranchExecuteEvent(java.lang.String classAndSignature,
int id)
Notification that a throws branch was executed. |
Method Detail |
---|
void initialize()
Initializes the event listener. Listeners that need to perform configuration or setup of state that will persist across multiple event streams should implement this method.
This method is called automatically by a
JUnitEventDispatcher
prior to beginning
execution of test cases. It is the responsibility of the applications
using other event dispatchers to call this method at the appropriate
time.
void newEventStream(int streamId)
Notification that a new branch event stream is starting.
streamId
- Identifier associated with the event stream, such as
a test case number.void commitEventStream(int streamId)
Notification that a branch event stream has completed.
streamId
- Identifier associated with the finished event stream,
such as a test case number.void methodEnterEvent(java.lang.String classAndSignature, int branchCount)
Notification that a new method has been entered.
This method provides the listener an opportunity to perform some action before beginning processing of branch events in a new method, such as setting up data structures.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method entered.branchCount
- The number of branches in the method.void ifBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that an if
branch was executed.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.void switchBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that a switch
branch was executed.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.void throwBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that a throws
branch was executed.
Note that a particular throws
statement is not
considered a branch if the control flow graph builder determines that
only one type of exception can ever be thrown.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.void callBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that a call
branch was executed.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.void entryBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that an entry
branch was executed.
Method entry is not actually a branch, however, this event is provided for the benefit of analyses that may wish to have information about method entry inlined in the event stream as a type-compatible entity.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.void otherBranchExecuteEvent(java.lang.String classAndSignature, int id)
Notification that a summary
branch was executed.
A summary branch is used to capture any branching of execution that causes exit from the currently executing method. This is normally associated with asynchronous exceptions and runtime exceptions that can potentially be raised at too many locations to be practically encoded in a control flow representation.
classAndSignature
- Concatenation of the fully qualified class
name, method name, and JNI signature of the method in which the
branch was executed.id
- Identifier of the branch that was executed. Correlates
to the branch identifiers reported in a
CFG
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |