String constants;Enum constants;Class literals;Annotations;kind() method returns the kind of this annotation member value. The is* methods
(such as isBoolean()) allow checking if this annotation member value is of given kind.
The as* methods (such as asBoolean()) allow "unwrapping" this annotation member value,
if it is of the corresponding kind.
Note that the as* methods do not perform type conversion, so if this annotation member value
is an int, calling asLong() will throw an exception.
Implementations of this interface are required to define the equals and hashCode methods.
Implementations of this interface are encouraged to define the toString method such that
it returns a text resembling the corresponding Java™ syntax.
There is no guarantee that any particular annotation member, represented by an implementation of this interface,
will always be represented by the same object. This includes natural singletons such as boolean values.
Instances should always be compared using equals.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | AnnotationMember.
The kind of the annotation member value. |
| Modifier and Type | Field and Description |
|---|---|
| public static final String | VALUE
Name of the commonly used |
| Modifier and Type | Method and Description |
|---|---|
| public List | Returns: an immutable list ofAnnotationMembersReturns this array value as an immutable |
| public boolean | |
| public byte | |
| public char | |
| public double | |
| public < the enum generic type E extends Enum | |
| public ClassInfo | |
| public String | |
| public float | |
| public int | |
| public long | |
| public AnnotationInfo | Returns: anAnnotationInfo instanceReturns this nested annotation value as an |
| public short | |
| public String | |
| public Type | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public default boolean | |
| public AnnotationMember. | Returns: the kind of this annotation member value, nevernullReturns the kind of this annotation member value. |
| VALUE | back to summary |
|---|---|
| public static final String VALUE Name of the commonly used | |
| asArray | back to summary |
|---|---|
| public List Returns this array value as an immutable
| |
| asBoolean | back to summary |
|---|---|
| public boolean asBoolean() Returns this value as a
| |
| asByte | back to summary |
|---|---|
| public byte asByte() Returns this value as a
| |
| asChar | back to summary |
|---|---|
| public char asChar() Returns this value as a
| |
| asDouble | back to summary |
|---|---|
| public double asDouble() Returns this value as a
| |
| asEnum | back to summary |
|---|---|
| public <E extends Enum Returns this enum value as an instance of the enum type.
| |
| asEnumClass | back to summary |
|---|---|
| public ClassInfo asEnumClass() Returns the type of this enum value.
| |
| asEnumConstant | back to summary |
|---|---|
| public String asEnumConstant() Returns the name of this enum value.
| |
| asFloat | back to summary |
|---|---|
| public float asFloat() Returns this value as a
| |
| asInt | back to summary |
|---|---|
| public int asInt() Returns this value as an
| |
| asLong | back to summary |
|---|---|
| public long asLong() Returns this value as a
| |
| asNestedAnnotation | back to summary |
|---|---|
| public AnnotationInfo asNestedAnnotation() Returns this nested annotation value as an
| |
| asShort | back to summary |
|---|---|
| public short asShort() Returns this value as a
| |
| asString | back to summary |
|---|---|
| public String asString() Returns this value as a
| |
| asType | back to summary |
|---|---|
| public Type asType() Returns this class value as a
| |
| isArray | back to summary |
|---|---|
public default boolean isArray()
| |
| isBoolean | back to summary |
|---|---|
public default boolean isBoolean()
| |
| isByte | back to summary |
|---|---|
public default boolean isByte()
| |
| isChar | back to summary |
|---|---|
public default boolean isChar()
| |
| isClass | back to summary |
|---|---|
public default boolean isClass()
| |
| isDouble | back to summary |
|---|---|
public default boolean isDouble()
| |
| isEnum | back to summary |
|---|---|
public default boolean isEnum()
| |
| isFloat | back to summary |
|---|---|
public default boolean isFloat()
| |
| isInt | back to summary |
|---|---|
public default boolean isInt()
| |
| isLong | back to summary |
|---|---|
public default boolean isLong()
| |
| isNestedAnnotation | back to summary |
|---|---|
public default boolean isNestedAnnotation()
| |
| isShort | back to summary |
|---|---|
public default boolean isShort()
| |
| isString | back to summary |
|---|---|
public default boolean isString()
| |
| kind | back to summary |
|---|---|
| public AnnotationMember. Returns the kind of this annotation member value.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final AnnotationMember. | ARRAY
An array value. |
| public static final AnnotationMember. | BOOLEAN
A primitive |
| public static final AnnotationMember. | BYTE
A primitive |
| public static final AnnotationMember. | CHAR
A primitive |
| public static final AnnotationMember. | |
| public static final AnnotationMember. | DOUBLE
A primitive |
| public static final AnnotationMember. | |
| public static final AnnotationMember. | FLOAT
A primitive |
| public static final AnnotationMember. | INT
A primitive |
| public static final AnnotationMember. | LONG
A primitive |
| public static final AnnotationMember. | NESTED_ANNOTATION
A nested |
| public static final AnnotationMember. | SHORT
A primitive |
| public static final AnnotationMember. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static AnnotationMember. | |
| public static AnnotationMember. |
| ARRAY | back to summary |
|---|---|
| public static final AnnotationMember. An array value. | |
| BOOLEAN | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| BYTE | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| CHAR | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| CLASS | back to summary |
|---|---|
| public static final AnnotationMember. | |
| DOUBLE | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| ENUM | back to summary |
|---|---|
| public static final AnnotationMember. An | |
| FLOAT | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| INT | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| LONG | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| NESTED_ANNOTATION | back to summary |
|---|---|
| public static final AnnotationMember. A nested | |
| SHORT | back to summary |
|---|---|
| public static final AnnotationMember. A primitive | |
| STRING | back to summary |
|---|---|
| public static final AnnotationMember. A | |
| Kind | back to summary |
|---|---|
| private Kind() | |
| valueOf | back to summary |
|---|---|
| public static AnnotationMember. | |
| values | back to summary |
|---|---|
| public static AnnotationMember. | |