Skip navigation links

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

E13403-06


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

All Superinterfaces:
Element, JavaElement
All Known Subinterfaces:
CompiledSelfVariable, CompiledTmpVariable, JavaClass, JavaField, JavaIsGeneric, JavaLocalVariable, JavaMember, JavaMethod, JavaPackage, JavaType, JavaTypeVariable, JavaVariable, JavaWildcardType, SourceClass, SourceClassInitializer, SourceEnumConstant, SourceFieldDeclaration, SourceFieldVariable, SourceFormalParameter, SourceLocalVariable, SourceMember, SourceMemberVariable, SourceMethod, SourceTypeParameter, SourceVariable
All Known Implementing Classes:
AbstractClass, AbstractField, AbstractMethod, AbstractPackage, AbstractType, AbstractVariable, BaseFileProvider.BaseClass, BaseFileProvider.BasePackage, CastedMethod, oracle.javatools.parser.java.v2.classfile.ClClass, PrimitiveType, QuickComponent, QuickLocalVariable, QuickMethod, Value, WrapperClass, WrapperField, WrapperLocalVariable, WrapperMethod, WrapperPackage

public interface JavaHasAnnotations
extends JavaElement

All runtime annotations are provided, both visible and invisible. That is, all annotations with @Retention values of CLASS and RUNTIME are returned. Annotations with a @Retention value of SOURCE is returned only if and only if source for this element is available.

Note: @Retention values for annotations on local variables that are not formal parameters are implicitly SOURCE.


Field Summary

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
EMPTY_ARRAY

 

Method Summary
 JavaAnnotation getAnnotation(JavaType annotationType)
          Retrieves the annotation declared on this element that matches the input annotation type.
 java.util.Collection getAnnotations()
          Retrieves all the annotations declared on this element.
 JavaAnnotation getDeclaredAnnotation(JavaType annotationType)
           
 java.util.Collection getDeclaredAnnotations()
          Retrieves all the annotations declared on this element.

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo

 

Method Detail

getDeclaredAnnotations

java.util.Collection getDeclaredAnnotations()
Retrieves all the annotations declared on this element.
Returns:
The collection of annotations declared on this element. Returns a Collection of JavaAnnotation's.

getAnnotations

java.util.Collection getAnnotations()
Retrieves all the annotations declared on this element. If this element is a class, then this will also iteratively retrieve all annotations declared on this class's hierarchy.
Returns:
The collection

getDeclaredAnnotation

JavaAnnotation getDeclaredAnnotation(JavaType annotationType)
Returns:
The matching annotation declared on this element. Null if none.

getAnnotation

JavaAnnotation getAnnotation(JavaType annotationType)
Retrieves the annotation declared on this element that matches the input annotation type. If this element is a class, then this will also iteratively search for an annotation of the matching annotation type on this class's hierarchy.
Returns:
The matching annotation declared on this element or its hierarchy (if this is a class). Null if none.

Skip navigation links

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

E13403-06


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