Package org.jboss.jandex
Class AnnotationValue.ClassValue
- java.lang.Object
-
- org.jboss.jandex.AnnotationValue
-
- org.jboss.jandex.AnnotationValue.ClassValue
-
- Enclosing class:
- AnnotationValue
static final class AnnotationValue.ClassValue extends AnnotationValue
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jboss.jandex.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
-
-
Field Summary
Fields Modifier and Type Field Description private Type
type
-
Fields inherited from class org.jboss.jandex.AnnotationValue
EMPTY_VALUE_ARRAY
-
-
Constructor Summary
Constructors Constructor Description ClassValue(java.lang.String name, Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Type
asClass()
Returns the class name, inType
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.-
Methods inherited from class org.jboss.jandex.AnnotationValue
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, createDoubleValue, createDouleValue, createEnumValue, createFloatValue, createIntegerValue, createLongalue, createLongValue, createNestedAnnotationValue, createShortValue, createStringValue, name, toString
-
-
-
-
Field Detail
-
type
private final Type type
-
-
Constructor Detail
-
ClassValue
ClassValue(java.lang.String name, Type type)
-
-
Method Detail
-
value
public Type value()
Description copied from class:AnnotationValue
Returns a detyped value that represents the underlying annotation value. It is recommended that the type specific methods be used instead.- Specified by:
value
in classAnnotationValue
- Returns:
- the underlying value
-
kind
public AnnotationValue.Kind kind()
Description copied from class:AnnotationValue
Returns the kind of this value. The kind includes all Java primitives, String and Enum types, nested values, and finally arrays of the above. Since the return type is itself an enumeration, it can be used with Java switch statements.A special
AnnotationValue.Kind.UNKNOWN
kind is used to refer to components of zero-length arrays, as the underlying type is not known.- Specified by:
kind
in classAnnotationValue
- Returns:
- the kind of value
-
asClass
public Type asClass()
Description copied from class:AnnotationValue
Returns the class name, inType
form, that represents a Java Class used by this value. In addition to standard class name, it can also refer to specialty types, such asVoid
and primitive types (e.g. int.class). More specifically, any erased type that a method can return is a valid annotation Class type.- Overrides:
asClass
in classAnnotationValue
- Returns:
- the Java type of this value
-
equals
public boolean equals(java.lang.Object o)
Description copied from class:AnnotationValue
Compares this annotation value to another annotation value, and returns true if equal.- Overrides:
equals
in classAnnotationValue
- Parameters:
o
- the annotation value to compare to.- Returns:
- true if equal, false if not
- See Also:
Object.equals(Object)
-
hashCode
public int hashCode()
Description copied from class:AnnotationValue
Computes a hash code for this annotation value.- Overrides:
hashCode
in classAnnotationValue
- Returns:
- the hash code for this annotation value
- See Also:
Object.hashCode()
-
-