Class MetadataAwareClassVisitor

    • Field Summary

      • Fields inherited from class org.objectweb.asm.ClassVisitor

        api, cv
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected MetadataAwareClassVisitor​(int api, org.objectweb.asm.ClassVisitor classVisitor)
      Creates a metadata aware class visitor.
    • Constructor Detail

      • MetadataAwareClassVisitor

        protected MetadataAwareClassVisitor​(int api,
                                            org.objectweb.asm.ClassVisitor classVisitor)
        Creates a metadata aware class visitor.
        Parameters:
        api - The API version.
        classVisitor - The class visitor to delegate to.
    • Method Detail

      • onNestHost

        protected void onNestHost()
        Invoked if the nest host was not visited.
      • onOuterType

        protected void onOuterType()
        Invoked if the outer class was not visited.
      • onAfterAttributes

        protected void onAfterAttributes()
        Invoked if the attribute visitation is about to complete.
      • onAfterRecordComponents

        protected void onAfterRecordComponents()
        Invoked after all record components are visited or none is found.
      • visitNestHost

        public final void visitNestHost​(String nestHost)
        Overrides:
        visitNestHost in class org.objectweb.asm.ClassVisitor
      • onVisitNestHost

        protected void onVisitNestHost​(String nestHost)
        An order-sensitive invocation of ClassVisitor.visitNestHost(String).
        Parameters:
        nestHost - The internal name of the nest host.
      • visitOuterClass

        public final void visitOuterClass​(String owner,
                                          String name,
                                          String descriptor)
        Overrides:
        visitOuterClass in class org.objectweb.asm.ClassVisitor
      • onVisitOuterClass

        protected void onVisitOuterClass​(String owner,
                                         String name,
                                         String descriptor)
        An order-sensitive invocation of ClassVisitor.visitOuterClass(String, String, String).
        Parameters:
        owner - The outer class's internal name.
        name - The outer method's name or null if it does not exist.
        descriptor - The outer method's descriptor or null if it does not exist.
      • visitRecordComponent

        public org.objectweb.asm.RecordComponentVisitor visitRecordComponent​(String name,
                                                                             String descriptor,
                                                                             String signature)
        Overrides:
        visitRecordComponent in class org.objectweb.asm.ClassVisitor
      • onVisitRecordComponent

        protected org.objectweb.asm.RecordComponentVisitor onVisitRecordComponent​(String name,
                                                                                  String descriptor,
                                                                                  String signature)
        An order-sensitive invocation of ClassVisitor.visitRecordComponent(String, String, String).
        Parameters:
        name - The record component's name.
        descriptor - The record component's descriptor.
        signature - The record component's generic signature or null if the record component's type is non-generic.
        Returns:
        The record component visitor or null if the component should not be visited.
      • visitAnnotation

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

        protected org.objectweb.asm.AnnotationVisitor onVisitAnnotation​(String descriptor,
                                                                        boolean visible)
        An order-sensitive invocation of ClassVisitor.visitAnnotation(String, boolean).
        Parameters:
        descriptor - The annotation type's descriptor.
        visible - true if the annotation is visible at runtime.
        Returns:
        An annotation visitor or null if the annotation should be ignored.
      • visitTypeAnnotation

        public final org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int typeReference,
                                                                             org.objectweb.asm.TypePath typePath,
                                                                             String descriptor,
                                                                             boolean visible)
        Overrides:
        visitTypeAnnotation in class org.objectweb.asm.ClassVisitor
      • onVisitTypeAnnotation

        protected org.objectweb.asm.AnnotationVisitor onVisitTypeAnnotation​(int typeReference,
                                                                            org.objectweb.asm.TypePath typePath,
                                                                            String descriptor,
                                                                            boolean visible)
        An order-sensitive invocation of ClassVisitor.visitTypeAnnotation(int, TypePath, String, boolean).
        Parameters:
        typeReference - The type reference of the type annotation.
        typePath - The type path of the type annotation.
        descriptor - The descriptor of the annotation type.
        visible - true if the annotation is visible at runtime.
        Returns:
        An annotation visitor or null if the annotation should be ignored.
      • visitAttribute

        public final void visitAttribute​(org.objectweb.asm.Attribute attribute)
        Overrides:
        visitAttribute in class org.objectweb.asm.ClassVisitor
      • onVisitAttribute

        protected void onVisitAttribute​(org.objectweb.asm.Attribute attribute)
        An order-sensitive invocation of ClassVisitor.visitAttribute(Attribute).
        Parameters:
        attribute - The attribute to visit.
      • visitNestMember

        public final void visitNestMember​(String nestMember)
        Overrides:
        visitNestMember in class org.objectweb.asm.ClassVisitor
      • onVisitNestMember

        protected void onVisitNestMember​(String nestMember)
        An order-sensitive invocation of ClassVisitor.visitNestMember(String).
        Parameters:
        nestMember - The internal name of the nest member.
      • visitInnerClass

        public final void visitInnerClass​(String name,
                                          String outerName,
                                          String innerName,
                                          int modifiers)
        Overrides:
        visitInnerClass in class org.objectweb.asm.ClassVisitor
      • onVisitInnerClass

        protected void onVisitInnerClass​(String name,
                                         String outerName,
                                         String innerName,
                                         int modifiers)
        An order-sensitive invocation of ClassVisitor.visitInnerClass(String, String, String, int).
        Parameters:
        name - The internal name of the inner class.
        outerName - The internal name of the outer class.
        innerName - The inner class's simple name or null for an anonymous class.
        modifiers - The inner class's source code modifiers.
      • visitField

        public final org.objectweb.asm.FieldVisitor visitField​(int modifiers,
                                                               String internalName,
                                                               String descriptor,
                                                               String signature,
                                                               Object defaultValue)
        Overrides:
        visitField in class org.objectweb.asm.ClassVisitor
      • onVisitField

        protected org.objectweb.asm.FieldVisitor onVisitField​(int modifiers,
                                                              String internalName,
                                                              String descriptor,
                                                              String signature,
                                                              Object defaultValue)
        An order-sensitive invocation of ClassVisitor.visitField(int, String, String, String, Object).
        Parameters:
        modifiers - The field's modifiers.
        internalName - The field's internal name.
        descriptor - The field type's descriptor.
        signature - The field's generic signature or null if the field is not generic.
        defaultValue - The field's default value or null if no such value exists.
        Returns:
        A field visitor to visit the field or null to ignore it.
      • visitMethod

        public final org.objectweb.asm.MethodVisitor visitMethod​(int modifiers,
                                                                 String internalName,
                                                                 String descriptor,
                                                                 String signature,
                                                                 String[] exception)
        Overrides:
        visitMethod in class org.objectweb.asm.ClassVisitor
      • onVisitMethod

        protected org.objectweb.asm.MethodVisitor onVisitMethod​(int modifiers,
                                                                String internalName,
                                                                String descriptor,
                                                                String signature,
                                                                String[] exception)
        An order-sensitive invocation of ClassVisitor.visitMethod(int, String, String, String, String[]).
        Parameters:
        modifiers - The method's modifiers.
        internalName - The method's internal name.
        descriptor - The field type's descriptor.
        signature - The method's generic signature or null if the method is not generic.
        exception - The method's declared exceptions or null if no exceptions are declared.
        Returns:
        A method visitor to visit the method or null to ignore it.
      • visitEnd

        public final void visitEnd()
        Overrides:
        visitEnd in class org.objectweb.asm.ClassVisitor
      • onVisitEnd

        protected void onVisitEnd()
        An order-sensitive invocation of ClassVisitor.visitEnd().