Package org.pf4j.asm

Class ExtensionVisitor

java.lang.Object
org.objectweb.asm.ClassVisitor
org.pf4j.asm.ExtensionVisitor

class ExtensionVisitor extends org.objectweb.asm.ClassVisitor
This visitor extracts an ExtensionInfo from any class, that holds an Extension annotation.

The annotation parameters are extracted from byte code by using the ASM library. This makes it possible to access the Extension parameters without loading the class into the class loader. This avoids possible NoClassDefFoundError's for extensions, that can't be loaded due to missing dependencies.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
     
    private final ExtensionInfo
     
    private static final org.slf4j.Logger
     

    Fields inherited from class org.objectweb.asm.ClassVisitor

    api, cv
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.objectweb.asm.AnnotationVisitor
    visitAnnotation(String descriptor, boolean visible)
     

    Methods inherited from class org.objectweb.asm.ClassVisitor

    getDelegate, visit, visitAttribute, visitEnd, visitField, visitInnerClass, visitMethod, 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
  • Field Details

    • log

      private static final org.slf4j.Logger log
    • ASM_VERSION

      private static final int ASM_VERSION
      See Also:
    • extensionInfo

      private final ExtensionInfo extensionInfo
  • Constructor Details

    • ExtensionVisitor

      ExtensionVisitor(ExtensionInfo extensionInfo)
  • Method Details

    • visitAnnotation

      public org.objectweb.asm.AnnotationVisitor visitAnnotation(String descriptor, boolean visible)
      Overrides:
      visitAnnotation in class org.objectweb.asm.ClassVisitor