org.ow2.asmdex.tree
Class FieldNode

java.lang.Object
  extended by org.ow2.asmdex.FieldVisitor
      extended by org.ow2.asmdex.tree.FieldNode

public class FieldNode
extends FieldVisitor

A node that represents a field.

Author:
Eric Bruneton, Julien Névo (adaptation to AsmDex).

Field Summary
 int access
          The field's access flags (see Opcodes).
 java.lang.String desc
          The field's descriptor.
 java.util.List<AnnotationNode> invisibleAnnotations
          The runtime invisible annotations of this class, field or method.
 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 class, field or method.
 
Fields inherited from class org.ow2.asmdex.FieldVisitor
api, fv
 
Constructor Summary
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.
 
Method Summary
 void accept(ClassVisitor cv)
          Makes the given class visitor visit this field.
 AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
          Visits an annotation of this class, field or method.
 
Methods inherited from class org.ow2.asmdex.FieldVisitor
visitAttribute, visitEnd
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

access

public int access
The field's access flags (see Opcodes). This field also indicates if the field is synthetic.


name

public java.lang.String name
The field's name.


desc

public java.lang.String desc
The field's descriptor.


signature

public java.lang.String[] signature
The field's signature. May be null.


value

public java.lang.Object value
The field's initial value. This field, 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.


visibleAnnotations

public java.util.List<AnnotationNode> visibleAnnotations
The runtime visible annotations of this class, field or method.


invisibleAnnotations

public java.util.List<AnnotationNode> invisibleAnnotations
The runtime invisible annotations of this class, field or method.

Constructor Detail

FieldNode

public 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.

Parameters:
api - the API level
access - the field's access flags (see Opcodes). This parameter also indicates if the field is synthetic.
name - the field's name.
desc - the field's descriptor .
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.

FieldNode

public FieldNode(int access,
                 java.lang.String name,
                 java.lang.String desc,
                 java.lang.String[] signature,
                 java.lang.Object value)
Constructs a new FieldNode.

Parameters:
access - the field's access flags (see Opcodes). This parameter also indicates if the field is synthetic.
name - the field's name.
desc - the field's descriptor .
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.
Method Detail

accept

public void accept(ClassVisitor cv)
Makes the given class visitor visit this field.

Parameters:
cv - a class visitor.

visitAnnotation

public AnnotationVisitor visitAnnotation(java.lang.String desc,
                                         boolean visible)
Visits an annotation of this class, field or method.

Overrides:
visitAnnotation in class FieldVisitor
Parameters:
desc - the class descriptor of the annotation class.
visible - true if the annotation is visible at runtime.
Returns:
a visitor to visit the annotation values.