public class AnnotationRemapper extends AnnotationVisitor
AnnotationVisitor that remaps types with a Remapper.| Modifier and Type | Field and Description |
|---|---|
protected Remapper |
remapper
The remapper used to remap the types in the visited annotation.
|
api, av| Modifier | Constructor and Description |
|---|---|
|
AnnotationRemapper(AnnotationVisitor annotationVisitor,
Remapper remapper)
Constructs a new
AnnotationRemapper. |
protected |
AnnotationRemapper(int api,
AnnotationVisitor annotationVisitor,
Remapper remapper)
Constructs a new
AnnotationRemapper. |
| Modifier and Type | Method and Description |
|---|---|
protected AnnotationVisitor |
createAnnotationRemapper(AnnotationVisitor annotationVisitor)
Constructs a new remapper for annotations.
|
void |
visit(java.lang.String name,
java.lang.Object value)
Visits a primitive value of the annotation.
|
AnnotationVisitor |
visitAnnotation(java.lang.String name,
java.lang.String descriptor)
Visits a nested annotation value of the annotation.
|
AnnotationVisitor |
visitArray(java.lang.String name)
Visits an array value of the annotation.
|
void |
visitEnum(java.lang.String name,
java.lang.String descriptor,
java.lang.String value)
Visits an enumeration value of the annotation.
|
visitEndprotected final Remapper remapper
public AnnotationRemapper(AnnotationVisitor annotationVisitor, Remapper remapper)
AnnotationRemapper. Subclasses must not use this constructor.
Instead, they must use the AnnotationRemapper(int,AnnotationVisitor,Remapper) version.annotationVisitor - the annotation visitor this remapper must deleted to.remapper - the remapper to use to remap the types in the visited annotation.protected AnnotationRemapper(int api,
AnnotationVisitor annotationVisitor,
Remapper remapper)
AnnotationRemapper.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.annotationVisitor - the annotation visitor this remapper must deleted to.remapper - the remapper to use to remap the types in the visited annotation.public void visit(java.lang.String name,
java.lang.Object value)
AnnotationVisitorvisit in class AnnotationVisitorname - the value name.value - the actual value, whose type must be Byte, Boolean, Character, Short, Integer , Long, Float, Double,
String or Type of Type.OBJECT or Type.ARRAY sort. This
value can also be an array of byte, boolean, short, char, int, long, float or double values
(this is equivalent to using AnnotationVisitor.visitArray(java.lang.String) and visiting each array element in turn,
but is more convenient).public void visitEnum(java.lang.String name,
java.lang.String descriptor,
java.lang.String value)
AnnotationVisitorvisitEnum in class AnnotationVisitorname - the value name.descriptor - the class descriptor of the enumeration class.value - the actual enumeration value.public AnnotationVisitor visitAnnotation(java.lang.String name, java.lang.String descriptor)
AnnotationVisitorvisitAnnotation in class AnnotationVisitorname - the value name.descriptor - the class descriptor of the nested annotation class.public AnnotationVisitor visitArray(java.lang.String name)
AnnotationVisitorvisit. This is what ClassReader does.visitArray in class AnnotationVisitorname - the value name.protected AnnotationVisitor createAnnotationRemapper(AnnotationVisitor annotationVisitor)
AnnotationRemapper.annotationVisitor - the AnnotationVisitor the remapper must delegate to.