org.codehaus.jam
Interface JAnnotatedElement

All Superinterfaces:
JElement
All Known Subinterfaces:
JClass, JConstructor, JField, JInvokable, JMember, JMethod, JPackage, JParameter, JProperty, MAnnotatedElement, MClass, MConstructor, MField, MInvokable, MMember, MMethod, MPackage, MParameter

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.

Author:
Patrick Calahan <email: codehaus-at-bea-dot-com>

Method Summary
 JAnnotation[] getAllJavadocTags()
          Deprecated.  
 JAnnotation getAnnotation(java.lang.Class proxyClass)
          Returns the JAnnotation which is being proxied by the given subclass of TypedAnnotationProxyBase, or null if no such annotation exists.
 JAnnotation getAnnotation(java.lang.String tagnameProxynameOr175typename)
          Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.
 java.lang.Object getAnnotationProxy(java.lang.Class proxyClass)
          Deprecated.  
 JAnnotation[] getAnnotations()
          Returns the metadata JAnnotations that are associated with this abstraction.
 JAnnotationValue getAnnotationValue(java.lang.String valueId)
          Shortcut method which returns a given annotation value.
 JComment getComment()
          Returns the comment associated with this abstraction.
 
Methods inherited from interface org.codehaus.jam.JElement
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, 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(java.lang.Class proxyClass)

Returns the JAnnotation which is being proxied by the given subclass of TypedAnnotationProxyBase, or null if no such annotation exists. If it does exist, the getProxy() method on the returned object is guaranteed to return be an instance of the proxyClass.

Throws:
java.lang.IllegalArgumentException - if the proxyClass parameter is null or not a subclass of TypedAnnotationProxyBase.

getAnnotationProxy

java.lang.Object getAnnotationProxy(java.lang.Class proxyClass)
Deprecated. 


getAnnotation

JAnnotation getAnnotation(java.lang.String tagnameProxynameOr175typename)

Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.


getAnnotationValue

JAnnotationValue getAnnotationValue(java.lang.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 -
Returns:

getComment

JComment getComment()

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


getAllJavadocTags

JAnnotation[] getAllJavadocTags()
Deprecated.