public class FieldNode extends FieldVisitor
| 限定符和类型 | 字段和说明 |
|---|---|
int |
access
The field's access flags (see
Opcodes). |
java.util.List<Attribute> |
attrs
The non standard attributes of this field.
|
java.lang.String |
desc
The field's descriptor (see
Type). |
java.util.List<AnnotationNode> |
invisibleAnnotations
The runtime invisible annotations of this field.
|
java.util.List<TypeAnnotationNode> |
invisibleTypeAnnotations
The runtime invisible type annotations of this field.
|
java.lang.String |
name
The field's name.
|
java.lang.String |
signature
The field's signature.
|
java.lang.Object |
value
The field's initial value.
|
java.util.List<AnnotationNode> |
visibleAnnotations
The runtime visible annotations of this field.
|
java.util.List<TypeAnnotationNode> |
visibleTypeAnnotations
The runtime visible type annotations of this field.
|
api, fv| 构造器和说明 |
|---|
FieldNode(int api,
int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
Constructs a new
FieldNode. |
FieldNode(int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
Constructs a new
FieldNode. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
accept(ClassVisitor cv)
Makes the given class visitor visit this field.
|
void |
check(int api)
Checks that this field node is compatible with the given ASM API version.
|
AnnotationVisitor |
visitAnnotation(java.lang.String desc,
boolean visible)
Visits an annotation of the field.
|
void |
visitAttribute(Attribute attr)
Visits a non standard attribute of the field.
|
void |
visitEnd()
Visits the end of the field.
|
AnnotationVisitor |
visitTypeAnnotation(int typeRef,
TypePath typePath,
java.lang.String desc,
boolean visible)
Visits an annotation on the type of the field.
|
public int access
Opcodes). This
field also indicates if the field is synthetic and/or deprecated.public java.lang.String name
public java.lang.String desc
Type).public java.lang.String signature
public java.lang.Object value
Integer, a
Float, a Long, a Double or a String.public java.util.List<AnnotationNode> visibleAnnotations
AnnotationNode objects. May be null.public java.util.List<AnnotationNode> invisibleAnnotations
AnnotationNode objects. May be null.public java.util.List<TypeAnnotationNode> visibleTypeAnnotations
TypeAnnotationNode objects. May be null.public java.util.List<TypeAnnotationNode> invisibleTypeAnnotations
TypeAnnotationNode objects. May be null.public FieldNode(int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
FieldNode. Subclasses must not use this
constructor. Instead, they must use the
FieldNode(int, int, String, String, String, Object) version.access - the field's access flags (see
Opcodes). This parameter also
indicates if the field is synthetic and/or deprecated.name - the field's name.desc - the field's descriptor (see Type).signature - the field's signature.value - the field's initial value. This parameter, which may be
null if the field does not have an initial value,
must be an Integer, a Float, a Long, a
Double or a String.java.lang.IllegalStateException - If a subclass calls this constructor.public FieldNode(int api,
int access,
java.lang.String name,
java.lang.String desc,
java.lang.String signature,
java.lang.Object value)
FieldNode. Subclasses must not use this
constructor.api - the ASM API version implemented by this visitor. Must be one
of Opcodes.ASM4 or Opcodes.ASM5.access - the field's access flags (see
Opcodes). This parameter also
indicates if the field is synthetic and/or deprecated.name - the field's name.desc - the field's descriptor (see Type).signature - the field's signature.value - the field's initial value. This parameter, which may be
null if the field does not have an initial value,
must be an Integer, a Float, a Long, a
Double or a String.public AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
FieldVisitorvisitAnnotation 在类中 FieldVisitordesc - the class descriptor of the annotation class.visible - true if the annotation is visible at runtime.public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, java.lang.String desc, boolean visible)
FieldVisitorvisitTypeAnnotation 在类中 FieldVisitortypeRef - a reference to the annotated type. The sort of this type
reference must be FIELD. See
TypeReference.typePath - the path to the annotated type argument, wildcard bound, array
element type, or static inner type within 'typeRef'. May be
null if the annotation targets 'typeRef' as a whole.desc - the class descriptor of the annotation class.visible - true if the annotation is visible at runtime.public void visitAttribute(Attribute attr)
FieldVisitorvisitAttribute 在类中 FieldVisitorattr - an attribute.public void visitEnd()
FieldVisitorvisitEnd 在类中 FieldVisitorpublic void check(int api)
api - an ASM API version. Must be one of Opcodes.ASM4 or
Opcodes.ASM5.public void accept(ClassVisitor cv)
cv - a class visitor.