public class EnumConstantElementValue extends ElementValue
ElementValue
represents an enumeration constant element value.Modifier and Type | Field and 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 |
referencedClass, referencedMethod, TAG_ANNOTATION, TAG_ARRAY, TAG_CLASS, TAG_ENUM_CONSTANT, TAG_STRING_CONSTANT, u2elementNameIndex
processingFlags, processingInfo
Constructor and Description |
---|
EnumConstantElementValue()
Creates an uninitialized EnumConstantElementValue.
|
EnumConstantElementValue(int u2elementNameIndex,
int u2typeNameIndex,
int u2constantNameIndex)
Creates an initialized EnumConstantElementValue.
|
Modifier and Type | Method and 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.
|
getMethodName, referencedMethodAccept
addProcessingFlags, getProcessingFlags, getProcessingInfo, hasProcessingFlags, removeProcessingFlags, setProcessingFlags, setProcessingInfo
public int u2typeNameIndex
public int u2constantNameIndex
public Clazz[] referencedClasses
ClassReferenceInitializer
. References to primitive types are ignored.public Field referencedField
ClassReferenceInitializer
.public EnumConstantElementValue()
public EnumConstantElementValue(int u2elementNameIndex, int u2typeNameIndex, int u2constantNameIndex)
public java.lang.String getTypeName(Clazz clazz)
public java.lang.String getConstantName(Clazz clazz)
public void referencedClassesAccept(ClassVisitor classVisitor)
public void referencedFieldAccept(MemberVisitor memberVisitor)
public char getTag()
ElementValue
getTag
in class ElementValue
public void accept(Clazz clazz, Annotation annotation, ElementValueVisitor elementValueVisitor)
ElementValue
accept
in class ElementValue