public class BuildClassMapTouchPointListener extends java.lang.Object implements TouchPointListener
classmap
.Constructor and Description |
---|
BuildClassMapTouchPointListener(ClassMap classMap) |
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. |
public BuildClassMapTouchPointListener(ClassMap classMap)
public void beforeJump(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor)
TouchPointListener
Called after code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
beforeJump
in interface TouchPointListener
eventId
- - id of the detected event.label
- - destination label of the jumpcurrentLine
- - number of currently visited linenextMethodVisitor
- - sink for instrumented codepublic void beforeLabel(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor mv)
TouchPointListener
beforeLabel
in interface TouchPointListener
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) codepublic void afterLineNumber(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor, java.lang.String methodName, java.lang.String methodSignature)
TouchPointListener
afterLineNumber
in interface TouchPointListener
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 methodpublic 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)
TouchPointListener
beforeSwitch
in interface TouchPointListener
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. *public void ignoreLine(int eventId, int currentLine)
TouchPointListener
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.
TouchPointListener.afterLineNumber(int, Label, int, MethodVisitor, String, String)
event will be (or has been already) fired.ignoreLine
in interface TouchPointListener
eventId
- - id of the event connected to the line (the same eventId that might be used for the line in TouchPointListener.afterLineNumber(int, Label, int, MethodVisitor, String, String)
)currentLine
- - number of line that should be ignored.public void afterJump(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor nextMethodVisitor)
TouchPointListener
Before code responsible for realizing 'interesting' JUMP
JUMP event is not called in case of GOTO and RETURN instruction (not conditional JUMPS)
afterJump
in interface TouchPointListener
eventId
- - id of the detected event.label
- - destination label of the jumpcurrentLine
- - number of currently visited linenextMethodVisitor
- - sink for instrumented codepublic void afterLabel(int eventId, org.objectweb.asm.Label label, int currentLine, org.objectweb.asm.MethodVisitor mv)
TouchPointListener
afterLabel
in interface TouchPointListener
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) codepublic void afterMethodStart(org.objectweb.asm.MethodVisitor nextMethodVisitor)
TouchPointListener
afterMethodStart
in interface TouchPointListener
nextMethodVisitor
- - sink for instrumented code