Class EnumConstantElementValue
- java.lang.Object
-
- proguard.util.SimpleProcessable
-
- proguard.classfile.attribute.annotation.ElementValue
-
- proguard.classfile.attribute.annotation.EnumConstantElementValue
-
- All Implemented Interfaces:
java.io.Serializable
,Processable
public class EnumConstantElementValue extends ElementValue
ThisElementValue
represents an enumeration constant element value.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Clazz[]
referencedClasses
An extra field pointing to the Clazz objects referenced in the type name string.Field
referencedField
An extra field optionally pointing to the referenced enum Field object.int
u2constantNameIndex
int
u2typeNameIndex
-
Fields inherited from class proguard.classfile.attribute.annotation.ElementValue
referencedClass, referencedMethod, TAG_ANNOTATION, TAG_ARRAY, TAG_CLASS, TAG_ENUM_CONSTANT, TAG_STRING_CONSTANT, u2elementNameIndex
-
Fields inherited from class proguard.util.SimpleProcessable
processingFlags, processingInfo
-
-
Constructor Summary
Constructors Constructor Description EnumConstantElementValue()
Creates an uninitialized EnumConstantElementValue.EnumConstantElementValue(int u2elementNameIndex, int u2typeNameIndex, int u2constantNameIndex)
Creates an initialized EnumConstantElementValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
Accepts the given visitor.java.lang.String
getConstantName(Clazz clazz)
Returns the constant name.char
getTag()
Returns the tag of this element value.java.lang.String
getTypeName(Clazz clazz)
Returns the enumeration type name.void
referencedClassesAccept(ClassVisitor classVisitor)
Applies the given visitor to all referenced classes.void
referencedFieldAccept(MemberVisitor memberVisitor)
Applies the given visitor to the referenced field.-
Methods inherited from class proguard.classfile.attribute.annotation.ElementValue
getMethodName, referencedMethodAccept
-
Methods inherited from class proguard.util.SimpleProcessable
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
-
-
-
-
Field Detail
-
u2typeNameIndex
public int u2typeNameIndex
-
u2constantNameIndex
public int u2constantNameIndex
-
referencedClasses
public Clazz[] referencedClasses
An extra field pointing to the Clazz objects referenced in the type name string. This field is typically filled out by the
. References to primitive types are ignored.ClassReferenceInitializer
-
referencedField
public Field referencedField
An extra field optionally pointing to the referenced enum Field object. This field is typically filled out by the
.ClassReferenceInitializer
-
-
Constructor Detail
-
EnumConstantElementValue
public EnumConstantElementValue()
Creates an uninitialized EnumConstantElementValue.
-
EnumConstantElementValue
public EnumConstantElementValue(int u2elementNameIndex, int u2typeNameIndex, int u2constantNameIndex)
Creates an initialized EnumConstantElementValue.
-
-
Method Detail
-
getTypeName
public java.lang.String getTypeName(Clazz clazz)
Returns the enumeration type name.
-
getConstantName
public java.lang.String getConstantName(Clazz clazz)
Returns the constant name.
-
referencedClassesAccept
public void referencedClassesAccept(ClassVisitor classVisitor)
Applies the given visitor to all referenced classes.
-
referencedFieldAccept
public void referencedFieldAccept(MemberVisitor memberVisitor)
Applies the given visitor to the referenced field.
-
getTag
public char getTag()
Description copied from class:ElementValue
Returns the tag of this element value.- Specified by:
getTag
in classElementValue
-
accept
public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
Description copied from class:ElementValue
Accepts the given visitor.- Specified by:
accept
in classElementValue
-
-