Package org.objectweb.asm.commons
Class AnnotationRemapper
- java.lang.Object
-
- org.objectweb.asm.AnnotationVisitor
-
- org.objectweb.asm.commons.AnnotationRemapper
-
public class AnnotationRemapper extends org.objectweb.asm.AnnotationVisitor
AnAnnotationVisitor
that remaps types with aRemapper
.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
descriptor
The descriptor of the visited annotation.protected Remapper
remapper
The remapper used to remap the types in the visited annotation.
-
Constructor Summary
Constructors Modifier Constructor Description protected
AnnotationRemapper(int api, java.lang.String descriptor, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Constructs a newAnnotationRemapper
.protected
AnnotationRemapper(int api, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Deprecated.AnnotationRemapper(java.lang.String descriptor, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Constructs a newAnnotationRemapper
.AnnotationRemapper(org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Deprecated.
-
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)
Deprecated.usecreateAnnotationRemapper(String, AnnotationVisitor)
instead.void
visit(java.lang.String name, java.lang.Object value)
org.objectweb.asm.AnnotationVisitor
visitAnnotation(java.lang.String name, java.lang.String descriptor)
org.objectweb.asm.AnnotationVisitor
visitArray(java.lang.String name)
void
visitEnum(java.lang.String name, java.lang.String descriptor, java.lang.String value)
-
-
-
Field Detail
-
descriptor
protected final java.lang.String descriptor
The descriptor of the visited annotation. May be null, for instance for AnnotationDefault.
-
remapper
protected final Remapper remapper
The remapper used to remap the types in the visited annotation.
-
-
Constructor Detail
-
AnnotationRemapper
@Deprecated public AnnotationRemapper(org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Deprecated.Constructs a newAnnotationRemapper
. Subclasses must not use this constructor. Instead, they must use theAnnotationRemapper(int,AnnotationVisitor,Remapper)
version.- Parameters:
annotationVisitor
- the annotation visitor this remapper must delegate to.remapper
- the remapper to use to remap the types in the visited annotation.
-
AnnotationRemapper
public AnnotationRemapper(java.lang.String descriptor, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Constructs a newAnnotationRemapper
. Subclasses must not use this constructor. Instead, they must use theAnnotationRemapper(int,String,AnnotationVisitor,Remapper)
version.- Parameters:
descriptor
- the descriptor of the visited annotation. May be null.annotationVisitor
- the annotation visitor this remapper must delegate to.remapper
- the remapper to use to remap the types in the visited annotation.
-
AnnotationRemapper
@Deprecated protected AnnotationRemapper(int api, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Deprecated.Constructs a newAnnotationRemapper
.- Parameters:
api
- the ASM API version supported by this remapper. Must be one ofOpcodes.ASM4
,Opcodes.ASM5
,Opcodes.ASM6
,Opcodes.ASM7
,Opcodes.ASM8
orOpcodes.ASM9
.annotationVisitor
- the annotation visitor this remapper must delegate to.remapper
- the remapper to use to remap the types in the visited annotation.
-
AnnotationRemapper
protected AnnotationRemapper(int api, java.lang.String descriptor, org.objectweb.asm.AnnotationVisitor annotationVisitor, Remapper remapper)
Constructs a newAnnotationRemapper
.- Parameters:
api
- the ASM API version supported by this remapper. Must be one ofOpcodes.ASM4
,Opcodes.ASM5
,Opcodes.ASM6
,Opcodes.ASM7
,Opcodes.ASM8
orOpcodes.ASM9
.descriptor
- the descriptor of the visited annotation. May be null.annotationVisitor
- the annotation visitor this remapper must delegate to.remapper
- the remapper to use to remap the types in the visited annotation.
-
-
Method Detail
-
visit
public void visit(java.lang.String name, java.lang.Object value)
- Overrides:
visit
in classorg.objectweb.asm.AnnotationVisitor
-
visitEnum
public void visitEnum(java.lang.String name, java.lang.String descriptor, java.lang.String value)
- Overrides:
visitEnum
in classorg.objectweb.asm.AnnotationVisitor
-
visitAnnotation
public org.objectweb.asm.AnnotationVisitor visitAnnotation(java.lang.String name, java.lang.String descriptor)
- Overrides:
visitAnnotation
in classorg.objectweb.asm.AnnotationVisitor
-
visitArray
public org.objectweb.asm.AnnotationVisitor visitArray(java.lang.String name)
- Overrides:
visitArray
in classorg.objectweb.asm.AnnotationVisitor
-
createAnnotationRemapper
@Deprecated protected org.objectweb.asm.AnnotationVisitor createAnnotationRemapper(org.objectweb.asm.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 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 newAnnotationRemapper
.- Parameters:
descriptor
- the descriptor of the visited annotation.annotationVisitor
- the AnnotationVisitor the remapper must delegate to.- Returns:
- the newly created remapper.
-
-