public interface TouchPointListener
Interfaces of listener that is called if interesting 'place' is found in instrumented/analyzed code
It is guaranteed that the same 'eventIds' will be used for the same events (in the case of identical source byte-code), so you can use this ids to identify the same places between different passes of instrumentation.Modifier and Type | Method and Description |
---|---|
void |
afterJump(int eventId,
org.objectweb.asm.Label label,
int currentLine,
org.objectweb.asm.MethodVisitor nextMethodVisitor)
Before code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
|
void |
afterLabel(int eventId,
org.objectweb.asm.Label label,
int currentLine,
org.objectweb.asm.MethodVisitor mv)
Called before processing 'label' directive
|
void |
afterLineNumber(int eventId,
org.objectweb.asm.Label label,
int currentLine,
org.objectweb.asm.MethodVisitor nextMethodVisitor,
java.lang.String methodName,
java.lang.String methodSignature)
after LINENUMBER instruction was processed.
|
void |
afterMethodStart(org.objectweb.asm.MethodVisitor nextMethodVisitor)
Event called when a new method have been just started for instrumentation.
|
void |
beforeJump(int eventId,
org.objectweb.asm.Label label,
int currentLine,
org.objectweb.asm.MethodVisitor nextMethodVisitor)
Called after code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
|
void |
beforeLabel(int eventId,
org.objectweb.asm.Label label,
int currentLine,
org.objectweb.asm.MethodVisitor mv)
Called before processing 'label' directive
|
void |
beforeSwitch(int eventId,
org.objectweb.asm.Label def,
org.objectweb.asm.Label[] labels,
int currentLine,
org.objectweb.asm.MethodVisitor mv,
java.lang.String conditionType)
Called befere processing switch statement.
|
void |
ignoreLine(int eventId,
int currentLine)
If we determined that some line should be not 'counted' by cobertura (for example the line might be specified in
AbstractFindTouchPointsClassInstrumenter.ignoreRegexp )
we call this method. |
void afterMethodStart(org.objectweb.asm.MethodVisitor nextMethodVisitor)
nextMethodVisitor
- - sink for instrumented codevoid afterJump(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor)
Before code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
eventId
- - id of the detected event.label
- - destination label of the jumpcurrentLine
- - number of currently visited linenextMethodVisitor
- - sink for instrumented codevoid beforeJump(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor)
Called after code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
eventId
- - id of the detected event.label
- - destination label of the jumpcurrentLine
- - number of currently visited linenextMethodVisitor
- - sink for instrumented codevoid afterLineNumber(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor, java.lang.String methodName, java.lang.String methodSignature)
eventId
- - id of the detected event.label
- - label connected to the linecurrentLine
- - number of currently visited linenextMethodVisitor
- - sink for instrumented codemethodName
- - name of currently being instrumented methodmethodSignature
- - signature (params and returned value type) of currently being instrumented methodvoid ignoreLine(int eventId, int currentLine)
If we determined that some line should be not 'counted' by cobertura (for example the line might be specified in AbstractFindTouchPointsClassInstrumenter.ignoreRegexp
)
we call this method.
afterLineNumber(int, Label, int, MethodVisitor, String, String)
event will be (or has been already) fired.eventId
- - id of the event connected to the line (the same eventId that might be used for the line in afterLineNumber(int, Label, int, MethodVisitor, String, String)
)currentLine
- - number of line that should be ignored.void beforeSwitch(int eventId, org.objectweb.asm.Label def, org.objectweb.asm.Label[] labels, int currentLine, org.objectweb.asm.MethodVisitor mv, java.lang.String conditionType)
eventId
- - id of the detected event.def
- - label of 'default' target label that will be used when none of given values match the switchlabels
- - table of labels connected to switch 'values' (different switch branches). There might be duplicates in the table (fall-through in switch statement)currentLine
- - number of line in which the 'switch' keyword has been found (number of line currently being processed)mv
- - sink for instrumented (injected) codeconditionType
- - NULL (if undetected) or signature of variable used as a switch condition. *void beforeLabel(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor mv)
eventId
- - id of the detected event.label
- - internal identifier of label being found (single pass of instrumentation valid only)currentLine
- - number of line in which the 'switch' keyword has been found (number of line currently being processed)mv
- - sink for instrumented (injected) codevoid afterLabel(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor mv)
eventId
- - id of the detected event.label
- - internal identifier of label being found (single pass of instrumentation valid only)currentLine
- - number of line in which the 'switch' keyword has been found (number of line currently being processed)mv
- - sink for instrumented (injected) code