Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

oracle.javatools.parser.java.v2.model
Interface JavaAnnotation

All Superinterfaces:
Element, JavaElement, JavaHasType
All Known Subinterfaces:
SourceAnnotation
All Known Implementing Classes:
AbstractAnnotation

public interface JavaAnnotation
extends JavaElement, JavaHasType

An instance of an annotation type.


Field Summary
static JavaAnnotation[] EMPTY_ARRAY
           
 
Method Summary
 JavaType getAnnotationType()
          Equivalent to getResolvedType().
 java.util.Map getArguments()
          Get the arguments used to instantiate the annotation
 java.util.Map getComponents()
          Here, "component" is not equivalent to "argument".
 boolean isInherited()
           
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType
getResolvedType, getUnresolvedType
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo
 

Field Detail

EMPTY_ARRAY

static final JavaAnnotation[] EMPTY_ARRAY
Method Detail

isInherited

boolean isInherited()
Returns:
True if this annotation bears the meta-annotation java/lang/annotation/Inherited.

getArguments

java.util.Map getArguments()
Get the arguments used to instantiate the annotation

Returns:
The map of arguments. Keys are Strings for the argument name. Values are Objects. For the type of the object, please see JavaVariable.getConstantValue().

getComponents

java.util.Map getComponents()
Here, "component" is not equivalent to "argument". A component is a declared member of an annotation type. An annotation can be instantiated with fewer arguments than components.

Consider:

Returns:
The map of components. Keys are Strings for the component name. In the above case the key would be "b". Values are Objects. For the type of the object, please see JavaVariable.getConstantValue().

getAnnotationType

JavaType getAnnotationType()
Equivalent to getResolvedType(). Provided to correspond with java/lang/annotation/Annotation.annotationType().

Returns:
The resolved annotation type that this annotation is an instance of.

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.4.0)

E13403-05

Copyright © 1997, 2011, Oracle. All rights reserved.