Interface IAnnotationComponentValue
- All Known Implementing Classes:
AnnotationComponentValue
public interface IAnnotationComponentValue
Description of an annotation component value as described in the JVM specifications
(added in J2SE 1.5).
This interface may be implemented by clients.
- Since:
- 3.1
-
Field Summary
Modifier and TypeFieldDescriptionstatic int
Tag value for a value that represents an annotationstatic int
Tag value for a value that represents an arraystatic int
Tag value for a constant of typeboolean
static int
Tag value for a constant of typebyte
static int
Tag value for a constant of typechar
static int
Tag value for a value that represents a classstatic int
Tag value for a constant of typedouble
static int
Tag value for a value that represents an enum constantstatic int
Tag value for a constant of typefloat
static int
Tag value for a constant of typeint
static int
Tag value for a constant of typelong
static int
Tag value for a constant of typeshort
static int
Tag value for a constant of typejava.lang.String
-
Method Summary
Modifier and TypeMethodDescriptionReturns the annotation component values as described in the JVM specifications if the tag item is '['.Returns the annotation value as described in the JVM specifications if the tag item is '@'.Returns the class info as described in the JVM specifications if the tag item is 'c'.int
Returns the class info index as described in the JVM specifications if the tag item is 'c'.Returns the constant value as described in the JVM specifications if the tag item is one of 'B', 'C', 'D', 'F', 'I', 'J', 'S', 'Z', or 's'.int
Returns the constant value index as described in the JVM specifications if the tag item is one of 'B', 'C', 'D', 'F', 'I', 'J', 'S', 'Z', or 's'.char[]
Returns the simple name of the enum constant represented by this annotation component value as described in the JVM specifications if the tag item is 'e'.int
Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'.char[]
Returns the binary name of the type of the enum constant represented by this annotation component value as described in the JVM specifications if the tag item is 'e'.int
Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'.int
getTag()
Returns the tag as described in the JVM specifications.int
Returns the number of values as described in the JVM specifications if the tag item is '['.
-
Field Details
-
BYTE_TAG
static final int BYTE_TAGTag value for a constant of typebyte
- Since:
- 3.1
- See Also:
- Constant Field Values
-
CHAR_TAG
static final int CHAR_TAGTag value for a constant of typechar
- Since:
- 3.1
- See Also:
- Constant Field Values
-
DOUBLE_TAG
static final int DOUBLE_TAGTag value for a constant of typedouble
- Since:
- 3.1
- See Also:
- Constant Field Values
-
FLOAT_TAG
static final int FLOAT_TAGTag value for a constant of typefloat
- Since:
- 3.1
- See Also:
- Constant Field Values
-
INTEGER_TAG
static final int INTEGER_TAGTag value for a constant of typeint
- Since:
- 3.1
- See Also:
- Constant Field Values
-
LONG_TAG
static final int LONG_TAGTag value for a constant of typelong
- Since:
- 3.1
- See Also:
- Constant Field Values
-
SHORT_TAG
static final int SHORT_TAGTag value for a constant of typeshort
- Since:
- 3.1
- See Also:
- Constant Field Values
-
BOOLEAN_TAG
static final int BOOLEAN_TAGTag value for a constant of typeboolean
- Since:
- 3.1
- See Also:
- Constant Field Values
-
STRING_TAG
static final int STRING_TAGTag value for a constant of typejava.lang.String
- Since:
- 3.1
- See Also:
- Constant Field Values
-
ENUM_TAG
static final int ENUM_TAGTag value for a value that represents an enum constant- Since:
- 3.1
- See Also:
- Constant Field Values
-
CLASS_TAG
static final int CLASS_TAGTag value for a value that represents a class- Since:
- 3.1
- See Also:
- Constant Field Values
-
ANNOTATION_TAG
static final int ANNOTATION_TAGTag value for a value that represents an annotation- Since:
- 3.1
- See Also:
- Constant Field Values
-
ARRAY_TAG
static final int ARRAY_TAGTag value for a value that represents an array- Since:
- 3.1
- See Also:
- Constant Field Values
-
-
Method Details
-
getAnnotationComponentValues
IAnnotationComponentValue[] getAnnotationComponentValues()Returns the annotation component values as described in the JVM specifications if the tag item is '['. Returns null otherwise.- Returns:
- the annotation component values
-
getAnnotationValue
IAnnotation getAnnotationValue()Returns the annotation value as described in the JVM specifications if the tag item is '@'. Returns null otherwise.- Returns:
- the attribute value
- Since:
- 3.1
-
getClassInfo
IConstantPoolEntry getClassInfo()Returns the class info as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Returns:
- the class info
-
getClassInfoIndex
int getClassInfoIndex()Returns the class info index as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Returns:
- the class info index
-
getConstantValue
IConstantPoolEntry getConstantValue()Returns the constant value as described in the JVM specifications if the tag item is one of 'B', 'C', 'D', 'F', 'I', 'J', 'S', 'Z', or 's'. Returns null otherwise.- Returns:
- the constant value
-
getConstantValueIndex
int getConstantValueIndex()Returns the constant value index as described in the JVM specifications if the tag item is one of 'B', 'C', 'D', 'F', 'I', 'J', 'S', 'Z', or 's'. The value is unspecified otherwise.- Returns:
- the constant value index
-
getEnumConstantName
char[] getEnumConstantName()Returns the simple name of the enum constant represented by this annotation component value as described in the JVM specifications if the tag item is 'e'. Returns null otherwise.- Returns:
- the enum constant
- Since:
- 3.1
-
getEnumConstantNameIndex
int getEnumConstantNameIndex()Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Returns:
- the enum constant index
- Since:
- 3.1
-
getEnumConstantTypeName
char[] getEnumConstantTypeName()Returns the binary name of the type of the enum constant represented by this annotation component value as described in the JVM specifications if the tag item is 'e'. Returns null otherwise.- Returns:
- the enum constant
- Since:
- 3.1
-
getEnumConstantTypeNameIndex
int getEnumConstantTypeNameIndex()Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Returns:
- the enum constant index
- Since:
- 3.1
-
getTag
int getTag()Returns the tag as described in the JVM specifications.- Returns:
- the tag
-
getValuesNumber
int getValuesNumber()Returns the number of values as described in the JVM specifications if the tag item is '['. The value is unspecified otherwise.- Returns:
- the number of values
-