Class MethodRemapper

java.lang.Object
org.objectweb.asm.MethodVisitor
org.objectweb.asm.commons.MethodRemapper

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

    • remapper

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

    • 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 the ASMx values in Opcodes.
      methodVisitor - the method visitor this remapper must delegate to.
      remapper - the remapper to use to remap the types in the visited method.
  • Method Details

    • visitAnnotationDefault

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

      public org.objectweb.asm.AnnotationVisitor visitAnnotation(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, String descriptor, boolean visible)
      Overrides:
      visitTypeAnnotation in class org.objectweb.asm.MethodVisitor
    • visitParameterAnnotation

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

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

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

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

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

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

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

      public void visitMultiANewArrayInsn(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, 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, String type)
      Overrides:
      visitTryCatchBlock in class org.objectweb.asm.MethodVisitor
    • visitTryCatchAnnotation

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

      public void visitLocalVariable(String name, String descriptor, 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, 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(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.