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 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_TAGModifier and TypeFieldDescriptionstatic final intTag value for a value that represents an annotationstatic final intTag value for a value that represents an arraystatic final intTag value for a constant of typebooleanstatic final intTag value for a constant of typebytestatic final intTag value for a constant of typecharstatic final intTag value for a value that represents a classstatic final intTag value for a constant of typedoublestatic final intTag value for a value that represents an enum constantstatic final intTag value for a constant of typefloatstatic final intTag value for a constant of typeintstatic final intTag value for a constant of typelongstatic final intTag value for a constant of typeshortstatic final intTag value for a constant of typejava.lang.String -
Constructor Summary
ConstructorsConstructorDescriptionAnnotationComponentValue(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'.intReturns 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'.intReturns 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'.intReturns 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'.intReturns the utf8 constant index as described in the JVM specifications if the tag item is 'e'.intgetTag()Returns the tag as described in the JVM specifications.intReturns the number of values as described in the JVM specifications if the tag item is '['.Methods inherited from class ClassFileStruct
doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8AtModifier and TypeMethodDescriptionprotected doubledoubleAt(byte[] reference, int relativeOffset, int structOffset) protected floatfloatAt(byte[] reference, int relativeOffset, int structOffset) protected inti1At(byte[] reference, int relativeOffset, int structOffset) protected inti2At(byte[] reference, int relativeOffset, int structOffset) protected inti4At(byte[] reference, int relativeOffset, int structOffset) protected longi8At(byte[] reference, int relativeOffset, int structOffset) protected intu1At(byte[] reference, int relativeOffset, int structOffset) protected intu2At(byte[] reference, int relativeOffset, int structOffset) protected intu4At(byte[] reference, int relativeOffset, int structOffset) Returns an 32 bit integer created of 4 bytes.protected char[]utf8At(byte[] reference, int relativeOffset, int structOffset, int bytesAvailable)
-
Constructor Details
-
AnnotationComponentValue
public AnnotationComponentValue(byte[] classFileBytes, IConstantPool constantPool, int offset) throws ClassFormatException - Throws:
ClassFormatException
-
-
Method Details
-
getAnnotationComponentValues
Description copied from interface:IAnnotationComponentValueReturns the annotation component values as described in the JVM specifications if the tag item is '['. Returns null otherwise.- Specified by:
getAnnotationComponentValuesin interfaceIAnnotationComponentValue- Returns:
- the annotation component values
-
getAnnotationValue
Description copied from interface:IAnnotationComponentValueReturns the annotation value as described in the JVM specifications if the tag item is '@'. Returns null otherwise.- Specified by:
getAnnotationValuein interfaceIAnnotationComponentValue- Returns:
- the attribute value
-
getClassInfo
Description copied from interface:IAnnotationComponentValueReturns the class info as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Specified by:
getClassInfoin interfaceIAnnotationComponentValue- Returns:
- the class info
-
getClassInfoIndex
public int getClassInfoIndex()Description copied from interface:IAnnotationComponentValueReturns the class info index as described in the JVM specifications if the tag item is 'c'. Returns null otherwise.- Specified by:
getClassInfoIndexin interfaceIAnnotationComponentValue- Returns:
- the class info index
-
getConstantValue
Description copied from interface:IAnnotationComponentValueReturns 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:
getConstantValuein interfaceIAnnotationComponentValue- Returns:
- the constant value
-
getConstantValueIndex
public int getConstantValueIndex()Description copied from interface:IAnnotationComponentValueReturns 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:
getConstantValueIndexin interfaceIAnnotationComponentValue- Returns:
- the constant value index
-
getEnumConstantName
public char[] getEnumConstantName()Description copied from interface:IAnnotationComponentValueReturns 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:
getEnumConstantNamein interfaceIAnnotationComponentValue- Returns:
- the enum constant
-
getEnumConstantNameIndex
public int getEnumConstantNameIndex()Description copied from interface:IAnnotationComponentValueReturns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Specified by:
getEnumConstantNameIndexin interfaceIAnnotationComponentValue- Returns:
- the enum constant index
-
getEnumConstantTypeName
public char[] getEnumConstantTypeName()Description copied from interface:IAnnotationComponentValueReturns 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:
getEnumConstantTypeNamein interfaceIAnnotationComponentValue- Returns:
- the enum constant
-
getEnumConstantTypeNameIndex
public int getEnumConstantTypeNameIndex()Description copied from interface:IAnnotationComponentValueReturns the utf8 constant index as described in the JVM specifications if the tag item is 'e'. The value is unspecified otherwise.- Specified by:
getEnumConstantTypeNameIndexin interfaceIAnnotationComponentValue- Returns:
- the enum constant index
-
getTag
public int getTag()Description copied from interface:IAnnotationComponentValueReturns the tag as described in the JVM specifications.- Specified by:
getTagin interfaceIAnnotationComponentValue- Returns:
- the tag
-
getValuesNumber
public int getValuesNumber()Description copied from interface:IAnnotationComponentValueReturns the number of values as described in the JVM specifications if the tag item is '['. The value is unspecified otherwise.- Specified by:
getValuesNumberin interfaceIAnnotationComponentValue- Returns:
- the number of values
-