sofya.ed
Interface BlockEventListener

All Known Implementing Classes:
SequenceTraceWriter

public interface BlockEventListener

A basic block event listener is notified by an event dispatcher each time a basic block is executed.

Version:
03/17/2006
Author:
Alex Kinneer

Method Summary
 void callBlockExecuteEvent(java.lang.String classAndSignature, int id)
          Notification that a call block was executed.
 void codeBlockExecuteEvent(java.lang.String classAndSignature, int id)
          Notification that a general basic block was executed.
 void commitEventStream(int streamId)
          Notification that a basic block event stream has completed.
 void entryBlockExecuteEvent(java.lang.String classAndSignature, int id)
          Notification that an entry block was executed.
 void exitBlockExecuteEvent(java.lang.String classAndSignature, int id)
          Notification that an exit block was executed.
 void initialize()
          Initializes the event listener.
 void methodEnterEvent(java.lang.String classAndSignature, int blockCount)
          Notification that a new method has been entered.
 void newEventStream(int streamId)
          Notification that a new basic block event stream is starting.
 void returnBlockExecuteEvent(java.lang.String classAndSignature, int id)
          Notification that a return block was executed.
 

Method Detail

initialize

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.


newEventStream

void newEventStream(int streamId)

Notification that a new basic block event stream is starting.

Parameters:
streamId - Identifier associated with the event stream, such as a test case number.

commitEventStream

void commitEventStream(int streamId)

Notification that a basic block event stream has completed.

Parameters:
streamId - Identifier associated with the finished event stream, such as a test case number.

methodEnterEvent

void methodEnterEvent(java.lang.String classAndSignature,
                      int blockCount)

Notification that a new method has been entered.

This method provides the listener an opportunity to perform some action before beginning processing of basic block events in a new method, such as setting up data structures.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method entered.
blockCount - The number of basic blocks in the method.

codeBlockExecuteEvent

void codeBlockExecuteEvent(java.lang.String classAndSignature,
                           int id)

Notification that a general basic block was executed.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method in which the basic block was executed.
id - Identifier of the basic block that was executed. Correlates to the basic block identifiers reported in a CFG.

callBlockExecuteEvent

void callBlockExecuteEvent(java.lang.String classAndSignature,
                           int id)

Notification that a call block was executed.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method in which the basic block was executed.
id - Identifier of the basic block that was executed. Correlates to the basic block identifiers reported in a CFG.

returnBlockExecuteEvent

void returnBlockExecuteEvent(java.lang.String classAndSignature,
                             int id)

Notification that a return block was executed.

A return block is a virtual block that does not correlate to any code in the executing program. It serves only as a marker that execution has returned to a caller following execution of a call block.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method in which the basic block was executed.
id - Identifier of the basic block that was executed. Correlates to the basic block identifiers reported in a CFG.

entryBlockExecuteEvent

void entryBlockExecuteEvent(java.lang.String classAndSignature,
                            int id)

Notification that an entry block was executed.

An entry block is a virtual block that does not correlate to any code in the executing program. It serves only as a marker that execution has entered a new method.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method in which the basic block was executed.
id - Identifier of the basic block that was executed. Correlates to the basic block identifiers reported in a CFG.

exitBlockExecuteEvent

void exitBlockExecuteEvent(java.lang.String classAndSignature,
                           int id)

Notification that an exit block was executed.

An exit block is a virtual block that does not correlate to any code in the executing program. It serves only as a marker that execution has exited a method.

There is only one normal exit block in a method, but there may be multiple exceptional exit blocks in a method.

Parameters:
classAndSignature - Concatenation of the fully qualified class name, method name, and JNI signature of the method in which the basic block was executed.
id - Identifier of the basic block that was executed. Correlates to the basic block identifiers reported in a CFG.