Class AnnotationComponentValue
java.lang.Object
org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
org.aspectj.org.eclipse.jdt.internal.core.util.AnnotationComponentValue
- All Implemented Interfaces:
IAnnotationComponentValue
Default implementation of IAnnotationComponent
-
Field Summary
Fields inherited from interface org.aspectj.org.eclipse.jdt.core.util.IAnnotationComponentValue
ANNOTATION_TAG, ARRAY_TAG, BOOLEAN_TAG, BYTE_TAG, CHAR_TAG, CLASS_TAG, DOUBLE_TAG, ENUM_TAG, FLOAT_TAG, INTEGER_TAG, LONG_TAG, SHORT_TAG, STRING_TAG
-
Constructor Summary
ConstructorDescriptionAnnotationComponentValue(byte[] classFileBytes, IConstantPool constantPool, int offset)
-
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 '['.
-
Constructor Details
-
AnnotationComponentValue
public AnnotationComponentValue(byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException- Throws:
ClassFormatException
-
-
Method Details
-
getAnnotationComponentValues
Description copied from interface:IAnnotationComponentValue
Returns the annotation component values as described in the JVM specifications if the tag item is '['. Returns null otherwise.- Specified by:
getAnnotationComponentValues
in interfaceIAnnotationComponentValue
- Returns:
- the annotation component values
-
getAnnotationValue
Description copied from interface:IAnnotationComponentValue
Returns the annotation value as described in the JVM specifications if the tag item is '@'. Returns null otherwise.- Specified by:
getAnnotationValue
in interfaceIAnnotationComponentValue
- Returns:
- the attribute value
-
getClassInfo
Description copied from interface:IAnnotationComponentValue
Returns the class info as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Specified by:
getClassInfo
in interfaceIAnnotationComponentValue
- Returns:
- the class info
-
getClassInfoIndex
public int getClassInfoIndex()Description copied from interface:IAnnotationComponentValue
Returns the class info index as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Specified by:
getClassInfoIndex
in interfaceIAnnotationComponentValue
- Returns:
- the class info index
-
getConstantValue
Description copied from interface:IAnnotationComponentValue
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.- Specified by:
getConstantValue
in interfaceIAnnotationComponentValue
- Returns:
- the constant value
-
getConstantValueIndex
public int getConstantValueIndex()Description copied from interface:IAnnotationComponentValue
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.- Specified by:
getConstantValueIndex
in interfaceIAnnotationComponentValue
- Returns:
- the constant value index
-
getEnumConstantName
public char[] getEnumConstantName()Description copied from interface:IAnnotationComponentValue
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.- Specified by:
getEnumConstantName
in interfaceIAnnotationComponentValue
- Returns:
- the enum constant
-
getEnumConstantNameIndex
public int getEnumConstantNameIndex()Description copied from interface:IAnnotationComponentValue
Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Specified by:
getEnumConstantNameIndex
in interfaceIAnnotationComponentValue
- Returns:
- the enum constant index
-
getEnumConstantTypeName
public char[] getEnumConstantTypeName()Description copied from interface:IAnnotationComponentValue
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.- Specified by:
getEnumConstantTypeName
in interfaceIAnnotationComponentValue
- Returns:
- the enum constant
-
getEnumConstantTypeNameIndex
public int getEnumConstantTypeNameIndex()Description copied from interface:IAnnotationComponentValue
Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Specified by:
getEnumConstantTypeNameIndex
in interfaceIAnnotationComponentValue
- Returns:
- the enum constant index
-
getTag
public int getTag()Description copied from interface:IAnnotationComponentValue
Returns the tag as described in the JVM specifications.- Specified by:
getTag
in interfaceIAnnotationComponentValue
- Returns:
- the tag
-
getValuesNumber
public int getValuesNumber()Description copied from interface:IAnnotationComponentValue
Returns the number of values as described in the JVM specifications if the tag item is '['. The value is unspecified otherwise.- Specified by:
getValuesNumber
in interfaceIAnnotationComponentValue
- Returns:
- the number of values
-