Package org.eclipse.jdt.core.util

## Interface IExtendedAnnotation

All Superinterfaces:
  `IAnnotation`

    public interface IExtendedAnnotation
    extends IAnnotation

Description of an extended annotation structure as described in the JVM specifications (added in JavaSE-1.8). This interface may be implemented by clients.

Since:
  3.10

### Method Summary

All Methods Instance Methods Abstract Methods
`int` `getAnnotationTypeIndex()` Answer back the index in the given different situations.
`int` `getExceptionTableIndex()` Answer back the exception table index when the target_type is EXCEPTION_PARAMETER.
`int` `getLocalVariableRefenceInfoLength()` Answer back the local variable reference info table length of this entry as specified in the JVM specifications.
`ILocalVariableReferenceInfo[]` `getLocalVariableTable()` Answer back the local variable reference info table of this entry as specified in the JVM specifications.
`int` `getOffset()` Answer back the offset.
`int` `getParameterIndex()` Answer back the method parameter index.
`int` `getTargetType()` Answer back the target type as described in the JVM specifications.
`int` `getTypeParameterBoundIndex()` Answer back the index of the bound of the type parameter of the method or class
`int` `getTypeParameterIndex()` Answer back the index of the type parameter of the class or method
`int[][]` `getTypePath()` Answer back the locations of the annotated type as described in the JVM specifications.

### Methods inherited from interface org.eclipse.jdt.core.util.IAnnotation

`getComponents, getComponentsNumber, getTypeIndex, getTypeName`

### Method Detail

#### getTargetType

    int getTargetType()

Answer back the target type as described in the JVM specifications.

Returns:
  the target type

#### getOffset

    int getOffset()

Answer back the offset. For a target_type value equals to:

target_type | offset description
--- | ---
0x43 (INSTANCE_OF), 0x44 (NEW), 0x45 (CONSTRUCTOR_REFERENCE), 0x46 (METHOD_REFERENCE) | The offset within the bytecodes of the `instanceof` bytecode for INSTANCE_OF, the `new` bytecode for NEW and the implementing instruction for either a CONSTRUCTOR_REFERENCE or METHOD_REFERENCE.

0x47 (CAST), 0x48 (CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT), 0x49 (METHOD_INVOCATION_TYPE_ARGUMENT), 0x4A (CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT), 0x4B (METHOD_REFERENCE_TYPE_ARGUMENT)

The offset within the bytecodes of the `new` bytecode for constructor call, or the relevant bytecode for method invocation or method reference. For CAST the offset may point to the `checkcast` or another instruction as it is possible the cast may have been discarded by the compiler if it were a no-op.

Returns:
  the offset

#### getExceptionTableIndex

    int getExceptionTableIndex()

Answer back the exception table index when the target_type is EXCEPTION_PARAMETER.

Returns:
  the exception table index

#### getLocalVariableRefenceInfoLength

    int getLocalVariableRefenceInfoLength()

Answer back the local variable reference info table length of this entry as specified in the JVM specifications.

This is defined only for annotations related to a local variable.

Returns:
  the local variable reference info table length of this entry as specified in the JVM specifications

#### getLocalVariableTable

    ILocalVariableReferenceInfo[] getLocalVariableTable()

Answer back the local variable reference info table of this entry as specified in the JVM specifications. Answer an empty array if none.

This is defined only for annotations related to a local variable.

Returns:
  the local variable reference info table of this entry as specified in the JVM specifications. Answer an empty array if none

#### getParameterIndex

    int getParameterIndex()

Answer back the method parameter index.

The index is 0-based.

Returns:
  the method parameter index

#### getTypeParameterIndex

    int getTypeParameterIndex()

Answer back the index of the type parameter of the class or method

The index is 0-based.

Returns:
  the index of the type parameter of the class or method

#### getTypeParameterBoundIndex

    int getTypeParameterBoundIndex()

Answer back the index of the bound of the type parameter of the method or class

The index is 0-based.

Returns:
  the index of the bound of the type parameter of the method or class

#### getAnnotationTypeIndex

    int getAnnotationTypeIndex()

Answer back the index in the given different situations.

The index is 0-based.

target_type | offset description
--- | ---
0x10 (CLASS_EXTENDS) | the index of the type in the clause: `-1 (65535)` is used if the annotation is on the superclass type, and the value `i` is used if the annotation is on the `i`th superinterface type (counting from zero).
0x17 (THROWS) | the index of the exception type in the clause: the value `i` denotes an annotation of the `i`th exception type (counting from zero).
0x47 (CAST), 0x48 (CONSTRUCTOR_INVOCATION_TYPE_ARGUMENT), 0x49 (METHOD_INVOCATION_TYPE_ARGUMENT), 0x4A (CONSTRUCTOR_REFERENCE_TYPE_ARGUMENT), 0x4B (METHOD_REFERENCE_TYPE_ARGUMENT) | the type argument index in the expression

Returns:
  the index in the given different situations

#### getTypePath

    int[][] getTypePath()

Answer back the locations of the annotated type as described in the JVM specifications.

This is used for parameterized and array types.

Returns:
  the locations of the annotated type