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 MAnnotation
addAnnotationForProxy(java.lang.Class proxyClass, AnnotationProxy proxy)
Deprecated.this is a back door for xbeans.MAnnotation
addLiteralAnnotation(java.lang.String annName)
MComment
createComment()
MAnnotation
findOrCreateAnnotation(java.lang.String annotationName)
Returns the annotation having the given name, creating it if it doesn't exist.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 named)
Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.java.lang.Object
getAnnotationProxy(java.lang.Class proxyClass)
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.AnnotationProxy
getEditableProxy(java.lang.Class proxyClass)
MAnnotation
getMutableAnnotation(java.lang.String named)
MAnnotation[]
getMutableAnnotations()
MComment
getMutableComment()
void
removeAnnotation(MAnnotation ann)
void
removeComment()
-
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:JAnnotatedElement
Returns the metadata JAnnotations that are associated with this abstraction. Returns an empty array if there are no annotations.
- Specified by:
getAnnotations
in interfaceJAnnotatedElement
-
getAnnotation
public JAnnotation getAnnotation(java.lang.Class proxyClass)
Description copied from interface:JAnnotatedElement
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.- Specified by:
getAnnotation
in interfaceJAnnotatedElement
-
getAnnotation
public JAnnotation getAnnotation(java.lang.String named)
Description copied from interface:JAnnotatedElement
Returns the annotation that represents the named 175 annotation or javadoc tag on this elements.
- Specified by:
getAnnotation
in interfaceJAnnotatedElement
-
getAnnotationValue
public JAnnotationValue getAnnotationValue(java.lang.String valueId)
Description copied from interface:JAnnotatedElement
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.- Specified by:
getAnnotationValue
in interfaceJAnnotatedElement
- Returns:
-
getAnnotationProxy
public java.lang.Object getAnnotationProxy(java.lang.Class proxyClass)
- Specified by:
getAnnotationProxy
in interfaceJAnnotatedElement
-
getComment
public JComment getComment()
Description copied from interface:JAnnotatedElement
Returns the comment associated with this abstraction. Returns null if it has no comment.
- Specified by:
getComment
in interfaceJAnnotatedElement
-
getAllJavadocTags
public JAnnotation[] getAllJavadocTags()
Deprecated.- Specified by:
getAllJavadocTags
in interfaceJAnnotatedElement
-
getEditableProxy
public AnnotationProxy getEditableProxy(java.lang.Class proxyClass)
-
removeAnnotation
public void removeAnnotation(MAnnotation ann)
-
getMutableAnnotations
public MAnnotation[] getMutableAnnotations()
- Specified by:
getMutableAnnotations
in interfaceMAnnotatedElement
-
getMutableAnnotation
public MAnnotation getMutableAnnotation(java.lang.String named)
- Specified by:
getMutableAnnotation
in interfaceMAnnotatedElement
-
findOrCreateAnnotation
public MAnnotation findOrCreateAnnotation(java.lang.String annotationName)
Description copied from interface:MAnnotatedElement
Returns the annotation having the given name, creating it if it doesn't exist.- Specified by:
findOrCreateAnnotation
in interfaceMAnnotatedElement
-
addLiteralAnnotation
public MAnnotation addLiteralAnnotation(java.lang.String annName)
- Specified by:
addLiteralAnnotation
in interfaceMAnnotatedElement
-
getMutableComment
public MComment getMutableComment()
- Specified by:
getMutableComment
in interfaceMAnnotatedElement
-
createComment
public MComment createComment()
- Specified by:
createComment
in interfaceMAnnotatedElement
-
removeComment
public void removeComment()
- Specified by:
removeComment
in 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.
-
-