Class AnnotatedElementImpl
- java.lang.Object
-
- org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
-
- org.apache.xmlbeans.impl.jam.internal.elements.AnnotatedElementImpl
-
- All Implemented Interfaces:
java.lang.Comparable,JAnnotatedElement,JElement,MAnnotatedElement,MElement
- Direct Known Subclasses:
BuiltinClassImpl,MemberImpl,PackageImpl,PropertyImpl
public abstract class AnnotatedElementImpl extends ElementImpl implements MAnnotatedElement
-
-
Field Summary
-
Fields inherited from class org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
NO_ANNOTATION, NO_CLASS, NO_COMMENT, NO_CONSTRUCTOR, NO_FIELD, NO_METHOD, NO_NODE, NO_PACKAGE, NO_PARAMETER, NO_PROPERTY
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MAnnotationaddAnnotationForProxy(java.lang.Class proxyClass, AnnotationProxy proxy)Deprecated.this is a back door for xbeans.MAnnotationaddLiteralAnnotation(java.lang.String annName)MCommentcreateComment()MAnnotationfindOrCreateAnnotation(java.lang.String annotationName)Returns the annotation having the given name, creating it if it doesn't exist.JAnnotation[]getAllJavadocTags()Deprecated.JAnnotationgetAnnotation(java.lang.Class proxyClass)Returns the JAnnotation which is being proxied by the given subclass of TypedAnnotationProxyBase, or null if no such annotation exists.JAnnotationgetAnnotation(java.lang.String named)Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.java.lang.ObjectgetAnnotationProxy(java.lang.Class proxyClass)JAnnotation[]getAnnotations()Returns the metadata JAnnotations that are associated with this abstraction.JAnnotationValuegetAnnotationValue(java.lang.String valueId)Shortcut method which returns a given annotation value.JCommentgetComment()Returns the comment associated with this abstraction.AnnotationProxygetEditableProxy(java.lang.Class proxyClass)MAnnotationgetMutableAnnotation(java.lang.String named)MAnnotation[]getMutableAnnotations()MCommentgetMutableComment()voidremoveAnnotation(MAnnotation ann)voidremoveComment()-
Methods inherited from class org.apache.xmlbeans.impl.jam.internal.elements.ElementImpl
compareTo, createSourcePosition, defaultName, equals, getArtifact, getClassLoader, getContext, getMutableSourcePosition, getParent, getSimpleName, getSourcePosition, hashCode, removeSourcePosition, setArtifact, setSimpleName, toString
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.JElement
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, toString
-
Methods inherited from interface org.apache.xmlbeans.impl.jam.mutable.MElement
accept, createSourcePosition, getClassLoader, getMutableSourcePosition, removeSourcePosition, setArtifact, setSimpleName
-
-
-
-
Method Detail
-
getAnnotations
public JAnnotation[] getAnnotations()
Description copied from interface:JAnnotatedElementReturns the metadata JAnnotations that are associated with this abstraction. Returns an empty array if there are no annotations.
- Specified by:
getAnnotationsin interfaceJAnnotatedElement
-
getAnnotation
public JAnnotation getAnnotation(java.lang.Class proxyClass)
Description copied from interface:JAnnotatedElementReturns 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.- Specified by:
getAnnotationin interfaceJAnnotatedElement
-
getAnnotation
public JAnnotation getAnnotation(java.lang.String named)
Description copied from interface:JAnnotatedElementReturns the annotation that represents the named 175 annotation or javadoc tag on this elements.
- Specified by:
getAnnotationin interfaceJAnnotatedElement
-
getAnnotationValue
public JAnnotationValue getAnnotationValue(java.lang.String valueId)
Description copied from interface:JAnnotatedElementShortcut 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.- Specified by:
getAnnotationValuein interfaceJAnnotatedElement- Returns:
-
getAnnotationProxy
public java.lang.Object getAnnotationProxy(java.lang.Class proxyClass)
- Specified by:
getAnnotationProxyin interfaceJAnnotatedElement
-
getComment
public JComment getComment()
Description copied from interface:JAnnotatedElementReturns the comment associated with this abstraction. Returns null if it has no comment.
- Specified by:
getCommentin interfaceJAnnotatedElement
-
getAllJavadocTags
public JAnnotation[] getAllJavadocTags()
Deprecated.- Specified by:
getAllJavadocTagsin interfaceJAnnotatedElement
-
getEditableProxy
public AnnotationProxy getEditableProxy(java.lang.Class proxyClass)
-
removeAnnotation
public void removeAnnotation(MAnnotation ann)
-
getMutableAnnotations
public MAnnotation[] getMutableAnnotations()
- Specified by:
getMutableAnnotationsin interfaceMAnnotatedElement
-
getMutableAnnotation
public MAnnotation getMutableAnnotation(java.lang.String named)
- Specified by:
getMutableAnnotationin interfaceMAnnotatedElement
-
findOrCreateAnnotation
public MAnnotation findOrCreateAnnotation(java.lang.String annotationName)
Description copied from interface:MAnnotatedElementReturns the annotation having the given name, creating it if it doesn't exist.- Specified by:
findOrCreateAnnotationin interfaceMAnnotatedElement
-
addLiteralAnnotation
public MAnnotation addLiteralAnnotation(java.lang.String annName)
- Specified by:
addLiteralAnnotationin interfaceMAnnotatedElement
-
getMutableComment
public MComment getMutableComment()
- Specified by:
getMutableCommentin interfaceMAnnotatedElement
-
createComment
public MComment createComment()
- Specified by:
createCommentin interfaceMAnnotatedElement
-
removeComment
public void removeComment()
- Specified by:
removeCommentin interfaceMAnnotatedElement
-
addAnnotationForProxy
public MAnnotation addAnnotationForProxy(java.lang.Class proxyClass, AnnotationProxy proxy)
Deprecated.this is a back door for xbeans. do not use, will be removed soon.
-
-