Class BytecodeVisitor


  • public class BytecodeVisitor
    extends org.objectweb.asm.ClassVisitor
    • Method Detail

      • visitSource

        public void visitSource​(@Nullable
                                String source,
                                @Nullable
                                String debug)
        Overrides:
        visitSource in class org.objectweb.asm.ClassVisitor
      • visitOuterClass

        public void visitOuterClass​(String owner,
                                    String name,
                                    String desc)

        In other words must be called only for anonymous classes or named classes declared within methods, which must not be processed by BytecodeCompleter, therefore this method always throws IllegalStateException.

        Overrides:
        visitOuterClass in class org.objectweb.asm.ClassVisitor
        Throws:
        IllegalStateException - always
      • visitAnnotation

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

        public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int typeRef,
                                                                       org.objectweb.asm.TypePath typePath,
                                                                       String desc,
                                                                       boolean visible)
        Overrides:
        visitTypeAnnotation in class org.objectweb.asm.ClassVisitor
      • visitAttribute

        public void visitAttribute​(org.objectweb.asm.Attribute attr)
        Overrides:
        visitAttribute in class org.objectweb.asm.ClassVisitor
      • visitInnerClass

        public void visitInnerClass​(String name,
                                    @Nullable
                                    String outerName,
                                    @Nullable
                                    String innerName,
                                    int flags)
        Overrides:
        visitInnerClass in class org.objectweb.asm.ClassVisitor
      • visitField

        public org.objectweb.asm.FieldVisitor visitField​(int flags,
                                                         String name,
                                                         String desc,
                                                         @Nullable
                                                         String signature,
                                                         @Nullable
                                                         Object value)
        Overrides:
        visitField in class org.objectweb.asm.ClassVisitor
      • visitMethod

        public org.objectweb.asm.MethodVisitor visitMethod​(int flags,
                                                           String name,
                                                           String desc,
                                                           @Nullable
                                                           String signature,
                                                           @Nullable
                                                           String[] exceptions)
        Overrides:
        visitMethod in class org.objectweb.asm.ClassVisitor
      • convertAsmType

        public JavaType convertAsmType​(org.objectweb.asm.Type asmType)
      • convertAsmType

        public JavaType convertAsmType​(org.objectweb.asm.Type asmType,
                                       int flags)
      • visitEnd

        public void visitEnd()
        If at this point there is no owner of current class, then this is a top-level class, because outer classes always will be completed before inner classes - see defineOuterClass(String, String, int). Owner of top-level classes - is a package.
        Overrides:
        visitEnd in class org.objectweb.asm.ClassVisitor