proguard.classfile.attribute.annotation
Class Annotation

java.lang.Object
  extended by proguard.classfile.attribute.annotation.Annotation
All Implemented Interfaces:
VisitorAccepter

public class Annotation
extends java.lang.Object
implements VisitorAccepter

Representation of an annotation.


Field Summary
 ElementValue[] elementValues
           
 Clazz[] referencedClasses
          An extra field pointing to the Clazz objects referenced in the type string.
 int u2elementValuesCount
           
 int u2typeIndex
           
 java.lang.Object visitorInfo
          An extra field in which visitors can store information.
 
Constructor Summary
Annotation()
          Creates an uninitialized Annotation.
Annotation(int u2typeIndex, int u2elementValuesCount, ElementValue[] elementValues)
          Creates an initialized Annotation.
 
Method Summary
 void elementValuesAccept(Clazz clazz, ElementValueVisitor elementValueVisitor)
          Applies the given visitor to all element value pairs.
 java.lang.String getType(Clazz clazz)
          Returns the type.
 java.lang.Object getVisitorInfo()
          Gets the visitor information of the visitor accepter.
 void referencedClassAccept(ClassVisitor classVisitor)
          Applies the given visitor to the first referenced class.
 void referencedClassesAccept(ClassVisitor classVisitor)
          Applies the given visitor to all referenced classes.
 void setVisitorInfo(java.lang.Object visitorInfo)
          Sets the visitor information of the visitor accepter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

u2typeIndex

public int u2typeIndex

u2elementValuesCount

public int u2elementValuesCount

elementValues

public ElementValue[] elementValues

referencedClasses

public Clazz[] referencedClasses
An extra field pointing to the Clazz objects referenced in the type string. This field is typically filled out by the ClassReferenceInitializer. References to primitive types are ignored.


visitorInfo

public java.lang.Object visitorInfo
An extra field in which visitors can store information.

Constructor Detail

Annotation

public Annotation()
Creates an uninitialized Annotation.


Annotation

public Annotation(int u2typeIndex,
                  int u2elementValuesCount,
                  ElementValue[] elementValues)
Creates an initialized Annotation.

Method Detail

getType

public java.lang.String getType(Clazz clazz)
Returns the type.


referencedClassAccept

public void referencedClassAccept(ClassVisitor classVisitor)
Applies the given visitor to the first referenced class. This is the main annotation class.


referencedClassesAccept

public void referencedClassesAccept(ClassVisitor classVisitor)
Applies the given visitor to all referenced classes.


elementValuesAccept

public void elementValuesAccept(Clazz clazz,
                                ElementValueVisitor elementValueVisitor)
Applies the given visitor to all element value pairs.


getVisitorInfo

public java.lang.Object getVisitorInfo()
Description copied from interface: VisitorAccepter
Gets the visitor information of the visitor accepter.

Specified by:
getVisitorInfo in interface VisitorAccepter

setVisitorInfo

public void setVisitorInfo(java.lang.Object visitorInfo)
Description copied from interface: VisitorAccepter
Sets the visitor information of the visitor accepter.

Specified by:
setVisitorInfo in interface VisitorAccepter