Class ClassInstrumenter
java.lang.Object
org.objectweb.asm.ClassVisitor
org.jacoco.core.internal.flow.ClassProbesVisitor
org.jacoco.core.internal.instr.ClassInstrumenter
Adapter that instruments a class for coverage tracing.
-
Field Summary
FieldsFields inherited from class org.objectweb.asm.ClassVisitor
api, cv -
Constructor Summary
ConstructorsConstructorDescriptionClassInstrumenter(IProbeArrayStrategy probeArrayStrategy, org.objectweb.asm.ClassVisitor cv) Emits a instrumented version of this class to the given class visitor. -
Method Summary
Modifier and TypeMethodDescriptionvoidvisit(int version, int access, String name, String signature, String superName, String[] interfaces) org.objectweb.asm.FieldVisitorvisitField(int access, String name, String desc, String signature, Object value) visitMethod(int access, String name, String desc, String signature, String[] exceptions) When visiting a method we need aMethodProbesVisitorto handle the probes of that method.voidvisitTotalProbeCount(int count) Reports the total number of encountered probes.Methods inherited from class org.objectweb.asm.ClassVisitor
getDelegate, visitAnnotation, visitAttribute, visitEnd, visitInnerClass, visitModule, visitNestHost, visitNestMember, visitOuterClass, visitPermittedSubclass, visitRecordComponent, visitSource, visitTypeAnnotation
-
Field Details
-
probeArrayStrategy
-
className
-
-
Constructor Details
-
ClassInstrumenter
Emits a instrumented version of this class to the given class visitor.- Parameters:
probeArrayStrategy- this strategy will be used to access the probe arraycv- next delegate in the visitor chain will receive the instrumented class
-
-
Method Details
-
visit
-
visitField
-
visitMethod
public MethodProbesVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) Description copied from class:ClassProbesVisitorWhen visiting a method we need aMethodProbesVisitorto handle the probes of that method.- Specified by:
visitMethodin classClassProbesVisitor
-
visitTotalProbeCount
public void visitTotalProbeCount(int count) Description copied from class:ClassProbesVisitorReports the total number of encountered probes. This method is called just beforeClassVisitor.visitEnd()- Specified by:
visitTotalProbeCountin classClassProbesVisitor- Parameters:
count- total number of probes
-