org.ow2.asmdex
Class FieldWriter

java.lang.Object
  extended by org.ow2.asmdex.FieldVisitor
      extended by org.ow2.asmdex.FieldWriter

public class FieldWriter
extends FieldVisitor

Class visiting a Field and registering it in order to write it.

Author:
Julien Névo.

Field Summary
 
Fields inherited from class org.ow2.asmdex.FieldVisitor
api, fv
 
Constructor Summary
FieldWriter(ConstantPool constantPool, java.lang.String classOwningName, int access, java.lang.String name, java.lang.String desc, java.lang.String[] signature, java.lang.Object value)
          Constructor of a Field Writer.
 
Method Summary
 Field getField()
          Returns the Field managed by the FieldWriter.
 AnnotationVisitor visitAnnotation(java.lang.String desc, boolean visible)
          Visits an annotation of the field.
 void visitAttribute(java.lang.Object attr)
          Visits a non standard attribute of the field.
 void visitEnd()
          Visits the end of the field.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldWriter

public FieldWriter(ConstantPool constantPool,
                   java.lang.String classOwningName,
                   int access,
                   java.lang.String name,
                   java.lang.String desc,
                   java.lang.String[] signature,
                   java.lang.Object value)
Constructor of a Field Writer.

Parameters:
constantPool - the ConstantPool of the Application.
classOwningName - the name of the Class owning the Field.
access - the access of the Field.
name - the name of the Field.
desc - the description of the Field.
signature - the Signature of the Field. May be Null.
value - the value of the Field. May be Null.
Method Detail

getField

public Field getField()
Returns the Field managed by the FieldWriter.

Returns:
the Field managed by the FieldWriter.

visitAnnotation

public AnnotationVisitor visitAnnotation(java.lang.String desc,
                                         boolean visible)
Description copied from class: FieldVisitor
Visits an annotation of the field.

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, or null if this visitor is not interested in visiting this annotation.

visitEnd

public void visitEnd()
Description copied from class: FieldVisitor
Visits the end of the field. This method, which is the last one to be called, is used to inform the visitor that all the annotations and attributes of the field have been visited.

Overrides:
visitEnd in class FieldVisitor

visitAttribute

public void visitAttribute(java.lang.Object attr)
Description copied from class: FieldVisitor
Visits a non standard attribute of the field. This method is ignored by AsmDex, and is only here for compatibility with ASM, as Attributes are not supported by AsmDex.

Overrides:
visitAttribute in class FieldVisitor
Parameters:
attr - an attribute.