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

    Fields inherited from class org.objectweb.asm.MethodVisitor

    api, mv
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new adapter instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setAnalyzer(org.objectweb.asm.commons.AnalyzerAdapter analyzer)
    If an analyzer is set IFrame handles are calculated and emitted to the probes methods.
    void
    visitInsn(int opcode)
     
    void
    visitJumpInsn(int opcode, org.objectweb.asm.Label label)
     
    void
    visitLabel(org.objectweb.asm.Label label)
     
    void
    visitLookupSwitchInsn(org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels)
     
    void
    visitTableSwitchInsn(int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label... labels)
     
    void
    visitTryCatchBlock(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

    Methods inherited from class java.lang.Object

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

    • MethodProbesAdapter

      public MethodProbesAdapter(MethodProbesVisitor probesVisitor, IProbeIdGenerator idGenerator)
      Create a new adapter instance.
      Parameters:
      probesVisitor - visitor to delegate to
      idGenerator - generator for unique probe ids
  • Method Details

    • setAnalyzer

      public void setAnalyzer(org.objectweb.asm.commons.AnalyzerAdapter analyzer)
      If an analyzer is set IFrame handles 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:
      visitTryCatchBlock in class org.objectweb.asm.MethodVisitor
    • visitLabel

      public void visitLabel(org.objectweb.asm.Label label)
      Overrides:
      visitLabel in class org.objectweb.asm.MethodVisitor
    • visitInsn

      public void visitInsn(int opcode)
      Overrides:
      visitInsn in class org.objectweb.asm.MethodVisitor
    • visitJumpInsn

      public void visitJumpInsn(int opcode, org.objectweb.asm.Label label)
      Overrides:
      visitJumpInsn in class org.objectweb.asm.MethodVisitor
    • visitLookupSwitchInsn

      public void visitLookupSwitchInsn(org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels)
      Overrides:
      visitLookupSwitchInsn in class org.objectweb.asm.MethodVisitor
    • visitTableSwitchInsn

      public void visitTableSwitchInsn(int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label... labels)
      Overrides:
      visitTableSwitchInsn in class org.objectweb.asm.MethodVisitor