Class ClassInstrumenter

java.lang.Object
org.objectweb.asm.ClassVisitor
org.jacoco.core.internal.flow.ClassProbesVisitor
org.jacoco.core.internal.instr.ClassInstrumenter

public class ClassInstrumenter extends ClassProbesVisitor
Adapter that instruments a class for coverage tracing.
  • Field Summary

    Fields inherited from class org.objectweb.asm.ClassVisitor

    api, cv
  • Constructor Summary

    Constructors
    Constructor
    Description
    ClassInstrumenter(IProbeArrayStrategy probeArrayStrategy, org.objectweb.asm.ClassVisitor cv)
    Emits a instrumented version of this class to the given class visitor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    visit(int version, int access, String name, String signature, String superName, String[] interfaces)
     
    org.objectweb.asm.FieldVisitor
    visitField(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 a MethodProbesVisitor to handle the probes of that method.
    void
    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClassInstrumenter

      public ClassInstrumenter(IProbeArrayStrategy probeArrayStrategy, org.objectweb.asm.ClassVisitor cv)
      Emits a instrumented version of this class to the given class visitor.
      Parameters:
      probeArrayStrategy - this strategy will be used to access the probe array
      cv - next delegate in the visitor chain will receive the instrumented class
  • Method Details