Package org.objectweb.asm.commons
Class MethodRemapper
- java.lang.Object
-
- org.objectweb.asm.MethodVisitor
-
- org.objectweb.asm.commons.MethodRemapper
-
public class MethodRemapper extends MethodVisitor
AMethodVisitorthat remaps types with aRemapper.- Author:
- Eugene Kuleshov
-
-
Field Summary
Fields Modifier and Type Field Description protected RemapperremapperThe remapper used to remap the types in the visited field.-
Fields inherited from class org.objectweb.asm.MethodVisitor
api, mv
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedMethodRemapper(int api, MethodVisitor methodVisitor, Remapper remapper)Constructs a newMethodRemapper.MethodRemapper(MethodVisitor methodVisitor, Remapper remapper)Constructs a newMethodRemapper.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected AnnotationVisitorcreateAnnotationRemapper(String descriptor, AnnotationVisitor annotationVisitor)Constructs a new remapper for annotations.protected AnnotationVisitorcreateAnnotationRemapper(AnnotationVisitor annotationVisitor)Deprecated.usecreateAnnotationRemapper(String, AnnotationVisitor)instead.AnnotationVisitorvisitAnnotation(String descriptor, boolean visible)AnnotationVisitorvisitAnnotationDefault()voidvisitFieldInsn(int opcode, String owner, String name, String descriptor)voidvisitFrame(int type, int numLocal, Object[] local, int numStack, Object[] stack)AnnotationVisitorvisitInsnAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)voidvisitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments)voidvisitLdcInsn(Object value)voidvisitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index)AnnotationVisitorvisitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String descriptor, boolean visible)voidvisitMethodInsn(int opcodeAndSource, String owner, String name, String descriptor, boolean isInterface)voidvisitMultiANewArrayInsn(String descriptor, int numDimensions)AnnotationVisitorvisitParameterAnnotation(int parameter, String descriptor, boolean visible)AnnotationVisitorvisitTryCatchAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)voidvisitTryCatchBlock(Label start, Label end, Label handler, String type)AnnotationVisitorvisitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)voidvisitTypeInsn(int opcode, 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
-
-
-
-
Field Detail
-
remapper
protected final Remapper remapper
The remapper used to remap the types in the visited field.
-
-
Constructor Detail
-
MethodRemapper
public MethodRemapper(MethodVisitor methodVisitor, Remapper remapper)
Constructs a newMethodRemapper. Subclasses must not use this constructor. Instead, they must use theMethodRemapper(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, MethodVisitor methodVisitor, Remapper remapper)Constructs a newMethodRemapper.- Parameters:
api- the ASM API version supported by this remapper. Must be one of theASMx values inOpcodes.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 AnnotationVisitor visitAnnotationDefault()
- Overrides:
visitAnnotationDefaultin classMethodVisitor
-
visitAnnotation
public AnnotationVisitor visitAnnotation(String descriptor, boolean visible)
- Overrides:
visitAnnotationin classMethodVisitor
-
visitTypeAnnotation
public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)
- Overrides:
visitTypeAnnotationin classMethodVisitor
-
visitParameterAnnotation
public AnnotationVisitor visitParameterAnnotation(int parameter, String descriptor, boolean visible)
- Overrides:
visitParameterAnnotationin classMethodVisitor
-
visitFrame
public void visitFrame(int type, int numLocal, Object[] local, int numStack, Object[] stack)- Overrides:
visitFramein classMethodVisitor
-
visitFieldInsn
public void visitFieldInsn(int opcode, String owner, String name, String descriptor)- Overrides:
visitFieldInsnin classMethodVisitor
-
visitMethodInsn
public void visitMethodInsn(int opcodeAndSource, String owner, String name, String descriptor, boolean isInterface)- Overrides:
visitMethodInsnin classMethodVisitor
-
visitInvokeDynamicInsn
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments)
- Overrides:
visitInvokeDynamicInsnin classMethodVisitor
-
visitTypeInsn
public void visitTypeInsn(int opcode, String type)- Overrides:
visitTypeInsnin classMethodVisitor
-
visitLdcInsn
public void visitLdcInsn(Object value)
- Overrides:
visitLdcInsnin classMethodVisitor
-
visitMultiANewArrayInsn
public void visitMultiANewArrayInsn(String descriptor, int numDimensions)
- Overrides:
visitMultiANewArrayInsnin classMethodVisitor
-
visitInsnAnnotation
public AnnotationVisitor visitInsnAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)
- Overrides:
visitInsnAnnotationin classMethodVisitor
-
visitTryCatchBlock
public void visitTryCatchBlock(Label start, Label end, Label handler, String type)
- Overrides:
visitTryCatchBlockin classMethodVisitor
-
visitTryCatchAnnotation
public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)
- Overrides:
visitTryCatchAnnotationin classMethodVisitor
-
visitLocalVariable
public void visitLocalVariable(String name, String descriptor, String signature, Label start, Label end, int index)
- Overrides:
visitLocalVariablein classMethodVisitor
-
visitLocalVariableAnnotation
public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String descriptor, boolean visible)
- Overrides:
visitLocalVariableAnnotationin classMethodVisitor
-
createAnnotationRemapper
@Deprecated protected AnnotationVisitor createAnnotationRemapper(AnnotationVisitor annotationVisitor)
Deprecated.usecreateAnnotationRemapper(String, AnnotationVisitor)instead.Constructs a new remapper for annotations. The default implementation of this method returns a newAnnotationRemapper.- Parameters:
annotationVisitor- the AnnotationVisitor the remapper must delegate to.- Returns:
- the newly created remapper.
-
createAnnotationRemapper
protected AnnotationVisitor createAnnotationRemapper(String descriptor, AnnotationVisitor annotationVisitor)
Constructs a new remapper for annotations. The default implementation of this method returns a newAnnotationRemapper.- Parameters:
descriptor- the descriptor of the visited annotation.annotationVisitor- the AnnotationVisitor the remapper must delegate to.- Returns:
- the newly created remapper.
-
-