static final class AnnotationValue.EnumValue extends AnnotationValue
AnnotationValue.ArrayValue, AnnotationValue.BooleanValue, AnnotationValue.ByteValue, AnnotationValue.CharacterValue, AnnotationValue.ClassValue, AnnotationValue.DoubleValue, AnnotationValue.EnumValue, AnnotationValue.FloatValue, AnnotationValue.IntegerValue, AnnotationValue.Kind, AnnotationValue.LongValue, AnnotationValue.NestedAnnotation, AnnotationValue.ShortValue, AnnotationValue.StringValue
Modifier and Type | Field and Description |
---|---|
private DotName |
typeName |
private java.lang.String |
value |
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
EnumValue(java.lang.String name,
DotName typeName,
java.lang.String value) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asEnum()
Returns the constant name, in string form, that represents the
Java enumeration of this value.
|
DotName |
asEnumType()
Returns the type name, in DotName form, that represents the
Java enumeration of this value.
|
boolean |
equals(java.lang.Object o)
Compares this annotation value to another annotation value, and returns true if equal.
|
int |
hashCode()
Computes a hash code for this annotation value.
|
AnnotationValue.Kind |
kind()
Returns the kind of this value.
|
java.lang.String |
value()
Returns a detyped value that represents the underlying annotation value.
|
asArray, asBoolean, asBooleanArray, asByte, asByteArray, asChar, asCharArray, asClass, asClassArray, asDouble, asDoubleArray, asEnumArray, asEnumTypeArray, asFloat, asFloatArray, asInt, asIntArray, asLong, asLongArray, asNested, asNestedArray, asShort, asShortArray, asString, asStringArray, componentKind, createArrayValue, createBooleanValue, createByteValue, createCharacterValue, createClassValue, createDouleValue, createEnumValue, createFloatValue, createIntegerValue, createLongalue, createNestedAnnotationValue, createShortValue, createStringValue, name, toString
private final java.lang.String value
private final DotName typeName
EnumValue(java.lang.String name, DotName typeName, java.lang.String value)
public java.lang.String value()
AnnotationValue
value
in class AnnotationValue
public AnnotationValue.Kind kind()
AnnotationValue
A special AnnotationValue.Kind.UNKNOWN
kind is used to refer to components
of zero-length arrays, as the underlying type is not known.
kind
in class AnnotationValue
public java.lang.String asEnum()
AnnotationValue
Enum.name()
.asEnum
in class AnnotationValue
public DotName asEnumType()
AnnotationValue
Object.getClass()
.asEnumType
in class AnnotationValue
public boolean equals(java.lang.Object o)
AnnotationValue
equals
in class AnnotationValue
o
- the annotation value to compare to.Object.equals(Object)
public int hashCode()
AnnotationValue
hashCode
in class AnnotationValue
Object.hashCode()