Class MethodRemapper


  • public class MethodRemapper
    extends org.objectweb.asm.MethodVisitor
    A MethodVisitor that remaps types with a Remapper.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Remapper remapper
      The remapper used to remap the types in the visited field.
      • Fields inherited from class org.objectweb.asm.MethodVisitor

        api, mv
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      protected org.objectweb.asm.AnnotationVisitor createAnnotationRemapper​(java.lang.String descriptor, org.objectweb.asm.AnnotationVisitor annotationVisitor)
      Constructs a new remapper for annotations.
      protected org.objectweb.asm.AnnotationVisitor createAnnotationRemapper​(org.objectweb.asm.AnnotationVisitor annotationVisitor)
      org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String descriptor, boolean visible)  
      org.objectweb.asm.AnnotationVisitor visitAnnotationDefault()  
      void visitFieldInsn​(int opcode, java.lang.String owner, java.lang.String name, java.lang.String descriptor)  
      void visitFrame​(int type, int numLocal, java.lang.Object[] local, int numStack, java.lang.Object[] stack)  
      org.objectweb.asm.AnnotationVisitor visitInsnAnnotation​(int typeRef, org.objectweb.asm.TypePath typePath, java.lang.String descriptor, boolean visible)  
      void visitInvokeDynamicInsn​(java.lang.String name, java.lang.String descriptor, org.objectweb.asm.Handle bootstrapMethodHandle, java.lang.Object... bootstrapMethodArguments)  
      void visitLdcInsn​(java.lang.Object value)  
      void visitLocalVariable​(java.lang.String name, java.lang.String descriptor, java.lang.String signature, org.objectweb.asm.Label start, org.objectweb.asm.Label end, int index)  
      org.objectweb.asm.AnnotationVisitor visitLocalVariableAnnotation​(int typeRef, org.objectweb.asm.TypePath typePath, org.objectweb.asm.Label[] start, org.objectweb.asm.Label[] end, int[] index, java.lang.String descriptor, boolean visible)  
      void visitMethodInsn​(int opcodeAndSource, java.lang.String owner, java.lang.String name, java.lang.String descriptor, boolean isInterface)  
      void visitMultiANewArrayInsn​(java.lang.String descriptor, int numDimensions)  
      org.objectweb.asm.AnnotationVisitor visitParameterAnnotation​(int parameter, java.lang.String descriptor, boolean visible)  
      org.objectweb.asm.AnnotationVisitor visitTryCatchAnnotation​(int typeRef, org.objectweb.asm.TypePath typePath, java.lang.String descriptor, boolean visible)  
      void visitTryCatchBlock​(org.objectweb.asm.Label start, org.objectweb.asm.Label end, org.objectweb.asm.Label handler, java.lang.String type)  
      org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int typeRef, org.objectweb.asm.TypePath typePath, java.lang.String descriptor, boolean visible)  
      void visitTypeInsn​(int opcode, java.lang.String type)  
      • Methods inherited from class org.objectweb.asm.MethodVisitor

        visitAnnotableParameterCount, visitAttribute, visitCode, visitEnd, visitIincInsn, visitInsn, visitIntInsn, visitJumpInsn, visitLabel, visitLineNumber, visitLookupSwitchInsn, visitMaxs, visitMethodInsn, visitParameter, visitTableSwitchInsn, visitVarInsn
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • remapper

        protected final Remapper remapper
        The remapper used to remap the types in the visited field.
    • Constructor Detail

      • MethodRemapper

        public MethodRemapper​(org.objectweb.asm.MethodVisitor methodVisitor,
                              Remapper remapper)
        Constructs a new MethodRemapper. Subclasses must not use this constructor. Instead, they must use the MethodRemapper(int,MethodVisitor,Remapper) version.
        Parameters:
        methodVisitor - the method visitor this remapper must delegate to.
        remapper - the remapper to use to remap the types in the visited method.
      • MethodRemapper

        protected MethodRemapper​(int api,
                                 org.objectweb.asm.MethodVisitor methodVisitor,
                                 Remapper remapper)
        Constructs a new MethodRemapper.
        Parameters:
        api - the ASM API version supported by this remapper. Must be one of Opcodes.ASM4, Opcodes.ASM5, Opcodes.ASM6, Opcodes.ASM7, Opcodes.ASM8 or Opcodes.ASM9.
        methodVisitor - the method visitor this remapper must delegate to.
        remapper - the remapper to use to remap the types in the visited method.
    • Method Detail

      • visitAnnotationDefault

        public org.objectweb.asm.AnnotationVisitor visitAnnotationDefault()
        Overrides:
        visitAnnotationDefault in class org.objectweb.asm.MethodVisitor
      • visitAnnotation

        public org.objectweb.asm.AnnotationVisitor visitAnnotation​(java.lang.String descriptor,
                                                                   boolean visible)
        Overrides:
        visitAnnotation in class org.objectweb.asm.MethodVisitor
      • visitTypeAnnotation

        public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation​(int typeRef,
                                                                       org.objectweb.asm.TypePath typePath,
                                                                       java.lang.String descriptor,
                                                                       boolean visible)
        Overrides:
        visitTypeAnnotation in class org.objectweb.asm.MethodVisitor
      • visitParameterAnnotation

        public org.objectweb.asm.AnnotationVisitor visitParameterAnnotation​(int parameter,
                                                                            java.lang.String descriptor,
                                                                            boolean visible)
        Overrides:
        visitParameterAnnotation in class org.objectweb.asm.MethodVisitor
      • visitFrame

        public void visitFrame​(int type,
                               int numLocal,
                               java.lang.Object[] local,
                               int numStack,
                               java.lang.Object[] stack)
        Overrides:
        visitFrame in class org.objectweb.asm.MethodVisitor
      • visitFieldInsn

        public void visitFieldInsn​(int opcode,
                                   java.lang.String owner,
                                   java.lang.String name,
                                   java.lang.String descriptor)
        Overrides:
        visitFieldInsn in class org.objectweb.asm.MethodVisitor
      • visitMethodInsn

        public void visitMethodInsn​(int opcodeAndSource,
                                    java.lang.String owner,
                                    java.lang.String name,
                                    java.lang.String descriptor,
                                    boolean isInterface)
        Overrides:
        visitMethodInsn in class org.objectweb.asm.MethodVisitor
      • visitInvokeDynamicInsn

        public void visitInvokeDynamicInsn​(java.lang.String name,
                                           java.lang.String descriptor,
                                           org.objectweb.asm.Handle bootstrapMethodHandle,
                                           java.lang.Object... bootstrapMethodArguments)
        Overrides:
        visitInvokeDynamicInsn in class org.objectweb.asm.MethodVisitor
      • visitTypeInsn

        public void visitTypeInsn​(int opcode,
                                  java.lang.String type)
        Overrides:
        visitTypeInsn in class org.objectweb.asm.MethodVisitor
      • visitLdcInsn

        public void visitLdcInsn​(java.lang.Object value)
        Overrides:
        visitLdcInsn in class org.objectweb.asm.MethodVisitor
      • visitMultiANewArrayInsn

        public void visitMultiANewArrayInsn​(java.lang.String descriptor,
                                            int numDimensions)
        Overrides:
        visitMultiANewArrayInsn in class org.objectweb.asm.MethodVisitor
      • visitInsnAnnotation

        public org.objectweb.asm.AnnotationVisitor visitInsnAnnotation​(int typeRef,
                                                                       org.objectweb.asm.TypePath typePath,
                                                                       java.lang.String descriptor,
                                                                       boolean visible)
        Overrides:
        visitInsnAnnotation in class org.objectweb.asm.MethodVisitor
      • visitTryCatchBlock

        public void visitTryCatchBlock​(org.objectweb.asm.Label start,
                                       org.objectweb.asm.Label end,
                                       org.objectweb.asm.Label handler,
                                       java.lang.String type)
        Overrides:
        visitTryCatchBlock in class org.objectweb.asm.MethodVisitor
      • visitTryCatchAnnotation

        public org.objectweb.asm.AnnotationVisitor visitTryCatchAnnotation​(int typeRef,
                                                                           org.objectweb.asm.TypePath typePath,
                                                                           java.lang.String descriptor,
                                                                           boolean visible)
        Overrides:
        visitTryCatchAnnotation in class org.objectweb.asm.MethodVisitor
      • visitLocalVariable

        public void visitLocalVariable​(java.lang.String name,
                                       java.lang.String descriptor,
                                       java.lang.String signature,
                                       org.objectweb.asm.Label start,
                                       org.objectweb.asm.Label end,
                                       int index)
        Overrides:
        visitLocalVariable in class org.objectweb.asm.MethodVisitor
      • visitLocalVariableAnnotation

        public org.objectweb.asm.AnnotationVisitor visitLocalVariableAnnotation​(int typeRef,
                                                                                org.objectweb.asm.TypePath typePath,
                                                                                org.objectweb.asm.Label[] start,
                                                                                org.objectweb.asm.Label[] end,
                                                                                int[] index,
                                                                                java.lang.String descriptor,
                                                                                boolean visible)
        Overrides:
        visitLocalVariableAnnotation in class org.objectweb.asm.MethodVisitor
      • createAnnotationRemapper

        @Deprecated
        protected org.objectweb.asm.AnnotationVisitor createAnnotationRemapper​(org.objectweb.asm.AnnotationVisitor annotationVisitor)
        Constructs a new remapper for annotations. The default implementation of this method returns a new AnnotationRemapper.
        Parameters:
        annotationVisitor - the AnnotationVisitor the remapper must delegate to.
        Returns:
        the newly created remapper.
      • createAnnotationRemapper

        protected org.objectweb.asm.AnnotationVisitor createAnnotationRemapper​(java.lang.String descriptor,
                                                                               org.objectweb.asm.AnnotationVisitor annotationVisitor)
        Constructs a new remapper for annotations. The default implementation of this method returns a new AnnotationRemapper.
        Parameters:
        descriptor - the descriptor of the visited annotation.
        annotationVisitor - the AnnotationVisitor the remapper must delegate to.
        Returns:
        the newly created remapper.