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, toStringprivate 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()
AnnotationValuevalue in class AnnotationValuepublic 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 AnnotationValuepublic java.lang.String asEnum()
AnnotationValueEnum.name().asEnum in class AnnotationValuepublic DotName asEnumType()
AnnotationValueObject.getClass().asEnumType in class AnnotationValuepublic boolean equals(java.lang.Object o)
AnnotationValueequals in class AnnotationValueo - the annotation value to compare to.Object.equals(Object)public int hashCode()
AnnotationValuehashCode in class AnnotationValueObject.hashCode()