Class Annotation
- java.lang.Object
-
- proguard.util.SimpleProcessable
-
- proguard.classfile.attribute.annotation.Annotation
-
- All Implemented Interfaces:
java.io.Serializable
,Processable
- Direct Known Subclasses:
TypeAnnotation
public class Annotation extends SimpleProcessable
Representation of an annotation.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description ElementValue[]
elementValues
Clazz[]
referencedClasses
An extra field pointing to the Clazz objects referenced in the type string.int
u2elementValuesCount
int
u2typeIndex
-
Fields inherited from class proguard.util.SimpleProcessable
processingFlags, processingInfo
-
-
Constructor Summary
Constructors Constructor Description Annotation()
Creates an uninitialized Annotation.Annotation(int u2typeIndex, int u2elementValuesCount, ElementValue[] elementValues)
Creates an initialized Annotation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
elementValueAccept(Clazz clazz, int index, ElementValueVisitor elementValueVisitor)
Applies the given visitor to the specified element value pair.void
elementValuesAccept(Clazz clazz, ElementValueVisitor elementValueVisitor)
Applies the given visitor to all element value pairs.java.lang.String
getType(Clazz clazz)
Returns the type.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.-
Methods inherited from class proguard.util.SimpleProcessable
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
-
-
-
-
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
. References to primitive types are ignored.ClassReferenceInitializer
-
-
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.
-
elementValueAccept
public void elementValueAccept(Clazz clazz, int index, ElementValueVisitor elementValueVisitor)
Applies the given visitor to the specified element value pair.
-
elementValuesAccept
public void elementValuesAccept(Clazz clazz, ElementValueVisitor elementValueVisitor)
Applies the given visitor to all element value pairs.
-
-