Class MethodProbesAdapter
java.lang.Object
org.objectweb.asm.MethodVisitor
org.jacoco.core.internal.flow.MethodProbesAdapter
public final class MethodProbesAdapter
extends org.objectweb.asm.MethodVisitor
Adapter that creates additional visitor events for probes to be inserted into
a method.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.objectweb.asm.commons.AnalyzerAdapterprivate final IProbeIdGeneratorprivate final MethodProbesVisitorprivate final Map<org.objectweb.asm.Label, org.objectweb.asm.Label> Fields inherited from class org.objectweb.asm.MethodVisitor
api, mv -
Constructor Summary
ConstructorsConstructorDescriptionMethodProbesAdapter(MethodProbesVisitor probesVisitor, IProbeIdGenerator idGenerator) Create a new adapter instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate IFrameframe(int popCount) private org.objectweb.asm.LabelgetTryCatchLabel(org.objectweb.asm.Label label) private intjumpPopCount(int opcode) private booleanmarkLabels(org.objectweb.asm.Label dflt, org.objectweb.asm.Label[] labels) voidsetAnalyzer(org.objectweb.asm.commons.AnalyzerAdapter analyzer) If an analyzer is setIFramehandles are calculated and emitted to the probes methods.voidvisitInsn(int opcode) voidvisitJumpInsn(int opcode, org.objectweb.asm.Label label) voidvisitLabel(org.objectweb.asm.Label label) voidvisitLookupSwitchInsn(org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels) voidvisitTableSwitchInsn(int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label... labels) voidvisitTryCatchBlock(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type) Methods inherited from class org.objectweb.asm.MethodVisitor
getDelegate, visitAnnotableParameterCount, visitAnnotation, visitAnnotationDefault, visitAttribute, visitCode, visitEnd, visitFieldInsn, visitFrame, visitIincInsn, visitInsnAnnotation, visitIntInsn, visitInvokeDynamicInsn, visitLdcInsn, visitLineNumber, visitLocalVariable, visitLocalVariableAnnotation, visitMaxs, visitMethodInsn, visitMethodInsn, visitMultiANewArrayInsn, visitParameter, visitParameterAnnotation, visitTryCatchAnnotation, visitTypeAnnotation, visitTypeInsn, visitVarInsn
-
Field Details
-
probesVisitor
-
idGenerator
-
analyzer
private org.objectweb.asm.commons.AnalyzerAdapter analyzer -
tryCatchProbeLabels
-
-
Constructor Details
-
MethodProbesAdapter
Create a new adapter instance.- Parameters:
probesVisitor- visitor to delegate toidGenerator- generator for unique probe ids
-
-
Method Details
-
setAnalyzer
public void setAnalyzer(org.objectweb.asm.commons.AnalyzerAdapter analyzer) If an analyzer is setIFramehandles are calculated and emitted to the probes methods.- Parameters:
analyzer- optional analyzer to set
-
visitTryCatchBlock
public void visitTryCatchBlock(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, String type) - Overrides:
visitTryCatchBlockin classorg.objectweb.asm.MethodVisitor
-
getTryCatchLabel
private org.objectweb.asm.Label getTryCatchLabel(org.objectweb.asm.Label label) -
visitLabel
public void visitLabel(org.objectweb.asm.Label label) - Overrides:
visitLabelin classorg.objectweb.asm.MethodVisitor
-
visitInsn
public void visitInsn(int opcode) - Overrides:
visitInsnin classorg.objectweb.asm.MethodVisitor
-
visitJumpInsn
public void visitJumpInsn(int opcode, org.objectweb.asm.Label label) - Overrides:
visitJumpInsnin classorg.objectweb.asm.MethodVisitor
-
jumpPopCount
private int jumpPopCount(int opcode) -
visitLookupSwitchInsn
public void visitLookupSwitchInsn(org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels) - Overrides:
visitLookupSwitchInsnin classorg.objectweb.asm.MethodVisitor
-
visitTableSwitchInsn
public void visitTableSwitchInsn(int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label... labels) - Overrides:
visitTableSwitchInsnin classorg.objectweb.asm.MethodVisitor
-
markLabels
private boolean markLabels(org.objectweb.asm.Label dflt, org.objectweb.asm.Label[] labels) -
frame
-