Package org.apache.xmlbeans.impl.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
- All Known Implementing Classes:
AnnotatedElementImpl
,ArrayClassImpl
,BuiltinClassImpl
,ClassImpl
,ConstructorImpl
,FieldImpl
,InvokableImpl
,MemberImpl
,MethodImpl
,PackageImpl
,ParameterImpl
,PrimitiveClassImpl
,PropertyImpl
,UnresolvedClassImpl
,VoidClassImpl
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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description JAnnotation[]
getAllJavadocTags()
Deprecated.JAnnotation
getAnnotation(Class proxyClass)
Returns the JAnnotation which is being proxied by the given subclass of TypedAnnotationProxyBase, or null if no such annotation exists.JAnnotation
getAnnotation(String tagnameProxynameOr175typename)
Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.Object
getAnnotationProxy(Class proxyClass)
Deprecated.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 org.apache.xmlbeans.impl.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(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:
IllegalArgumentException
- if the proxyClass parameter is null or not a subclass ofTypedAnnotationProxyBase
.
-
getAnnotation
JAnnotation getAnnotation(String tagnameProxynameOr175typename)
Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.
-
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
-- Returns:
-
getComment
JComment getComment()
Returns the comment associated with this abstraction. Returns null if it has no comment.
-
getAllJavadocTags
JAnnotation[] getAllJavadocTags()
Deprecated.
-
-