org.aspectj.org.eclipse.jdt.internal.core.util
Class AnnotationComponentValue

java.lang.Object
  extended by org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
      extended by org.aspectj.org.eclipse.jdt.internal.core.util.AnnotationComponentValue
All Implemented Interfaces:
IAnnotationComponentValue

public class AnnotationComponentValue
extends ClassFileStruct
implements 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
AnnotationComponentValue(byte[] classFileBytes, IConstantPool constantPool, int offset)
           
 
Method Summary
 IAnnotationComponentValue[] getAnnotationComponentValues()
          Returns the annotation component values as described in the JVM specifications if the tag item is '['.
 IAnnotation getAnnotationValue()
          Returns the annotation value as described in the JVM specifications if the tag item is '@'.
 IConstantPoolEntry getClassInfo()
          Returns the class info as described in the JVM specifications if the tag item is 'c'.
 int getClassInfoIndex()
          Returns the class info index as described in the JVM specifications if the tag item is 'c'.
 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'.
 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'.
 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'.
 int getEnumConstantNameIndex()
          Returns the utf8 constant index as described in the JVM specifications if the tag item is 'e'.
 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'.
 int getEnumConstantTypeNameIndex()
          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 getValuesNumber()
          Returns the number of values as described in the JVM specifications if the tag item is '['.
 
Methods inherited from class org.aspectj.org.eclipse.jdt.internal.core.util.ClassFileStruct
doubleAt, floatAt, i1At, i2At, i4At, i8At, u1At, u2At, u4At, utf8At
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationComponentValue

public AnnotationComponentValue(byte[] classFileBytes,
                                IConstantPool constantPool,
                                int offset)
                         throws ClassFormatException
Throws:
ClassFormatException
Method Detail

getAnnotationComponentValues

public IAnnotationComponentValue[] 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 interface IAnnotationComponentValue
Returns:
the annotation component values

getAnnotationValue

public IAnnotation 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 interface IAnnotationComponentValue
Returns:
the attribute value

getClassInfo

public IConstantPoolEntry 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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
Returns:
the class info index

getConstantValue

public IConstantPoolEntry 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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
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 interface IAnnotationComponentValue
Returns:
the number of values