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.
Modifier and Type | Method and Description |
---|---|
JAnnotation[] |
getAllJavadocTags()
Returns JAnnotations representing all of the javadoc tags on this
element (including multiple tags with the same name).
|
JAnnotation |
getAnnotation(java.lang.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(java.lang.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(java.lang.String valueId)
Shortcut method which returns a given annotation value.
|
JComment |
getComment()
Returns the comment associated with this abstraction.
|
accept, getArtifact, getParent, getQualifiedName, getSimpleName, getSourcePosition, isSourceAvailable, toString
JAnnotation[] getAnnotations()
Returns the metadata JAnnotations that are associated with this abstraction. Returns an empty array if there are no annotations.
JAnnotation getAnnotation(java.lang.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.
java.lang.IllegalArgumentException
- if the jsr175type parameter is null
or not a 175 type.JAnnotation getAnnotation(java.lang.String named)
Finds an annotation on this element according to the following rules:
JAnnotationValue getAnnotationValue(java.lang.String valueId)
valueId
- JComment getComment()
Returns the comment associated with this abstraction. Returns null if it has no comment.
JAnnotation[] getAllJavadocTags()