public class FieldNode extends FieldVisitor
Modifier and Type | Field and Description |
---|---|
int |
access
The field's access flags (see
Opcodes ). |
List<Attribute> |
attrs
The non standard attributes of this field.
|
String |
desc
The field's descriptor (see
Type ). |
List<AnnotationNode> |
invisibleAnnotations
The runtime invisible annotations of this field.
|
List<TypeAnnotationNode> |
invisibleTypeAnnotations
The runtime invisible type annotations of this field.
|
String |
name
The field's name.
|
String |
signature
The field's signature.
|
Object |
value
The field's initial value.
|
List<AnnotationNode> |
visibleAnnotations
The runtime visible annotations of this field.
|
List<TypeAnnotationNode> |
visibleTypeAnnotations
The runtime visible type annotations of this field.
|
api, fv
Constructor and Description |
---|
FieldNode(int api,
int access,
String name,
String descriptor,
String signature,
Object value)
Constructs a new
FieldNode . |
FieldNode(int access,
String name,
String descriptor,
String signature,
Object value)
Constructs a new
FieldNode . |
Modifier and Type | Method and Description |
---|---|
void |
accept(ClassVisitor classVisitor)
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(String descriptor,
boolean visible)
Visits an annotation of the field.
|
void |
visitAttribute(Attribute attribute)
Visits a non standard attribute of the field.
|
void |
visitEnd()
Visits the end of the field.
|
AnnotationVisitor |
visitTypeAnnotation(int typeRef,
TypePath typePath,
String descriptor,
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 String name
public String signature
public Object value
public List<AnnotationNode> visibleAnnotations
public List<AnnotationNode> invisibleAnnotations
public List<TypeAnnotationNode> visibleTypeAnnotations
public List<TypeAnnotationNode> invisibleTypeAnnotations
public FieldNode(int access, String name, String descriptor, String signature, 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.descriptor
- 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
.IllegalStateException
- If a subclass calls this constructor.public FieldNode(int api, int access, String name, String descriptor, String signature, 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.descriptor
- 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(String descriptor, boolean visible)
FieldVisitor
visitAnnotation
in class FieldVisitor
descriptor
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible)
FieldVisitor
visitTypeAnnotation
in class FieldVisitor
typeRef
- a reference to the annotated type. The sort of this type reference must be
TypeReference.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.descriptor
- the class descriptor of the annotation class.visible
- true if the annotation is visible at runtime.public void visitAttribute(Attribute attribute)
FieldVisitor
visitAttribute
in class FieldVisitor
attribute
- an attribute.public void visitEnd()
FieldVisitor
visitEnd
in class FieldVisitor
public void check(int api)
api
- an ASM API version. Must be one of Opcodes.ASM4
, Opcodes.ASM5
,
Opcodes.ASM6
or Opcodes.ASM7
.public void accept(ClassVisitor classVisitor)
classVisitor
- a class visitor.Copyright © 2018. All rights reserved.