Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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".
 java.util.Map<java.lang.String,java.lang.Object> getUnresolvedArguments()
          Get the arguments used to instantiate the annotation, but don't try to resolve any types.
 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().

getUnresolvedArguments

java.util.Map<java.lang.String,java.lang.Object> getUnresolvedArguments()
Get the arguments used to instantiate the annotation, but don't try to resolve any types. This is useful for situations where no JavaProvider is available to do type resolution
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(), but any JavaTypes are now returned as JavaHasTypes, and enum values are returned as JavaHasName.

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.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK
11g Release 2 (11.1.2.3.0)

E17493-04


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