Package org.objectweb.asm.tree
Class FieldNode
java.lang.Object
org.objectweb.asm.FieldVisitor
org.objectweb.asm.tree.FieldNode
public class FieldNode
extends org.objectweb.asm.FieldVisitor
A node that represents a field.
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
The field's access flags (seeOpcodes
).List<org.objectweb.asm.Attribute>
The non standard attributes of this field. * May be null.The field's descriptor (seeType
).The runtime invisible annotations of this field.The runtime invisible type annotations of this field.The field's name.The field's signature.The field's initial value.The runtime visible annotations of this field.The runtime visible type annotations of this field.Fields inherited from class org.objectweb.asm.FieldVisitor
api, fv
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(org.objectweb.asm.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.org.objectweb.asm.AnnotationVisitor
visitAnnotation
(String descriptor, boolean visible) void
visitAttribute
(org.objectweb.asm.Attribute attribute) void
visitEnd()
org.objectweb.asm.AnnotationVisitor
visitTypeAnnotation
(int typeRef, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) Methods inherited from class org.objectweb.asm.FieldVisitor
getDelegate
-
Field Details
-
access
public int accessThe field's access flags (seeOpcodes
). This field also indicates if the field is synthetic and/or deprecated. -
name
The field's name. -
desc
The field's descriptor (seeType
). -
signature
The field's signature. May be null. -
value
-
visibleAnnotations
The runtime visible annotations of this field. May be null. -
invisibleAnnotations
The runtime invisible annotations of this field. May be null. -
visibleTypeAnnotations
The runtime visible type annotations of this field. May be null. -
invisibleTypeAnnotations
The runtime invisible type annotations of this field. May be null. -
attrs
The non standard attributes of this field. * May be null.
-
-
Constructor Details
-
FieldNode
Constructs a newFieldNode
. Subclasses must not use this constructor. Instead, they must use theFieldNode(int, int, String, String, String, Object)
version.- Parameters:
access
- the field's access flags (seeOpcodes
). This parameter also indicates if the field is synthetic and/or deprecated.name
- the field's name.descriptor
- the field's descriptor (seeType
).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 anInteger
, aFloat
, aLong
, aDouble
or aString
.- Throws:
IllegalStateException
- If a subclass calls this constructor.
-
FieldNode
public FieldNode(int api, int access, String name, String descriptor, String signature, Object value) Constructs a newFieldNode
.- Parameters:
api
- the ASM API version implemented by this visitor. Must be one of theASM
x values inOpcodes
.access
- the field's access flags (seeOpcodes
). This parameter also indicates if the field is synthetic and/or deprecated.name
- the field's name.descriptor
- the field's descriptor (seeType
).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 anInteger
, aFloat
, aLong
, aDouble
or aString
.
-
-
Method Details
-
visitAnnotation
- Overrides:
visitAnnotation
in classorg.objectweb.asm.FieldVisitor
-
visitTypeAnnotation
public org.objectweb.asm.AnnotationVisitor visitTypeAnnotation(int typeRef, org.objectweb.asm.TypePath typePath, String descriptor, boolean visible) - Overrides:
visitTypeAnnotation
in classorg.objectweb.asm.FieldVisitor
-
visitAttribute
public void visitAttribute(org.objectweb.asm.Attribute attribute) - Overrides:
visitAttribute
in classorg.objectweb.asm.FieldVisitor
-
visitEnd
public void visitEnd()- Overrides:
visitEnd
in classorg.objectweb.asm.FieldVisitor
-
check
public void check(int api) Checks that this field node is compatible with the given ASM API version. This method checks that this node, and all its children recursively, do not contain elements that were introduced in more recent versions of the ASM API than the given version.- Parameters:
api
- an ASM API version. Must be one of theASM
x values inOpcodes
.
-
accept
public void accept(org.objectweb.asm.ClassVisitor classVisitor) Makes the given class visitor visit this field.- Parameters:
classVisitor
- a class visitor.
-