static final class AnnotationValue.ClassValue 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 Type |
type |
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
ClassValue(java.lang.String name,
Type type) |
Modifier and Type | Method and Description |
---|---|
Type |
asClass()
Returns the class name, in
Type form, that represents a Java
Class used by 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.
|
Type |
value()
Returns a detyped value that represents the underlying annotation value.
|
asArray, asBoolean, asBooleanArray, asByte, asByteArray, asChar, asCharArray, asClassArray, asDouble, asDoubleArray, asEnum, asEnumArray, asEnumType, 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 Type type
ClassValue(java.lang.String name, Type type)
public Type 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 Type asClass()
AnnotationValue
Type
form, that represents a Java
Class used by this value. In addition to standard class name, it can also
refer to specialty types, such as Void
and primitive types (e.g.
int.class). More specifically, any erased type that a method can return
is a valid annotation Class type.asClass
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()