Class ElementValue
java.lang.Object
proguard.util.SimpleProcessable
proguard.classfile.attribute.annotation.ElementValue
- All Implemented Interfaces:
Serializable,Processable
- Direct Known Subclasses:
AnnotationElementValue,ArrayElementValue,ClassElementValue,ConstantElementValue,EnumConstantElementValue
This abstract class represents an element value that is attached to an annotation or an
annotation default. Specific types of element values are subclassed from it.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionAn extra field pointing to the referencedClazzobject, if applicable.An extra field pointing to the referencedMethodobject, if applicable.static final charstatic final charstatic final charstatic final charstatic final charintAn extra field for the optional element name.Fields inherited from class proguard.util.SimpleProcessable
processingFlags, processingInfo -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates an uninitialized ElementValue.protectedElementValue(int u2elementNameIndex) Creates an initialized ElementValue. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaccept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor) Accepts the given visitor.getMethodName(Clazz clazz) Returns the element name.abstract chargetTag()Returns the tag of this element value.voidreferencedMethodAccept(MemberVisitor memberVisitor) Applies the given visitor to the referenced method.Methods inherited from class proguard.util.SimpleProcessable
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface proguard.util.Processable
accept
-
Field Details
-
TAG_STRING_CONSTANT
public static final char TAG_STRING_CONSTANT- See Also:
-
TAG_ENUM_CONSTANT
public static final char TAG_ENUM_CONSTANT- See Also:
-
TAG_CLASS
public static final char TAG_CLASS- See Also:
-
TAG_ANNOTATION
public static final char TAG_ANNOTATION- See Also:
-
TAG_ARRAY
public static final char TAG_ARRAY- See Also:
-
u2elementNameIndex
public int u2elementNameIndexAn extra field for the optional element name. It is used in element value pairs of annotations. Otherwise, it is 0. -
referencedClass
An extra field pointing to the referencedClazzobject, if applicable. This field is typically filled out by the.ClassReferenceInitializer -
referencedMethod
An extra field pointing to the referencedMethodobject, if applicable. This field is typically filled out by the.ClassReferenceInitializer
-
-
Constructor Details
-
ElementValue
protected ElementValue()Creates an uninitialized ElementValue. -
ElementValue
protected ElementValue(int u2elementNameIndex) Creates an initialized ElementValue.
-
-
Method Details
-
getMethodName
Returns the element name. -
getTag
public abstract char getTag()Returns the tag of this element value. -
accept
public abstract void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor) Accepts the given visitor. -
referencedMethodAccept
Applies the given visitor to the referenced method.
-