Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01

com.bea.util.jam
Interface JAnnotatedElement

All Superinterfaces:
JElement
All Known Subinterfaces:
JClass, JConstructor, JField, JInvokable, JMember, JMethod, JPackage, JParameter, JProperty

public interface JAnnotatedElement
extends JElement

Base abstraction for JElements which can carry annotations and comments. The only JElements which cannot do this are JAnnotation and JComment.


Method Summary
 JAnnotation[] getAllJavadocTags()
          Returns JAnnotations representing all of the javadoc tags on this element (including multiple tags with the same name).
 JAnnotation getAnnotation(Class jsr175type)
          Returns the JAnnotation representing the annotation on this element of the given JSR 175 annotation type, or null if no such annotation exists.
 JAnnotation getAnnotation(String named)
          Finds an annotation on this element according to the following rules: If the element as a JSR175 annotation of type 'named', returns a JAnnotation for it. If a javadoc tag exists named 'named' returns a JAnnotation for it.
 JAnnotation[] getAnnotations()
          Returns the metadata JAnnotations that are associated with this abstraction.
 JAnnotationValue getAnnotationValue(String valueId)
          Shortcut method which returns a given annotation value.
 JComment getComment()
          Returns the comment associated with this abstraction.
 
Methods inherited from interface com.bea.util.jam.JElement
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, isSourceAvailable, toString
 

Method Detail

getAnnotations

JAnnotation[] getAnnotations()

Returns the metadata JAnnotations that are associated with this abstraction. Returns an empty array if there are no annotations.


getAnnotation

JAnnotation getAnnotation(Class jsr175type)

Returns the JAnnotation representing the annotation on this element of the given JSR 175 annotation type, or null if no such annotation exists.

Throws:
IllegalArgumentException - if the jsr175type parameter is null or not a 175 type.

getAnnotation

JAnnotation getAnnotation(String named)

Finds an annotation on this element according to the following rules:


getAnnotationValue

JAnnotationValue getAnnotationValue(String valueId)
Shortcut method which returns a given annotation value. The 'valueId' should be a string of the format 'annotation-name@value-name'. The value-name may be ommitted; if it is, it defaults to JAnntoation.SINGLE_MEMBER_VALUE.

Parameters:
valueId -

getComment

JComment getComment()

Returns the comment associated with this abstraction. Returns null if it has no comment.


getAllJavadocTags

JAnnotation[] getAllJavadocTags()
Returns JAnnotations representing all of the javadoc tags on this element (including multiple tags with the same name).


Copyright 1996, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

Oracle Fusion Middleware
Java API Reference for Oracle WebLogic Server
12c (12.1.2)

Part Number E27170-01