public interface Annotatable extends Traversable
| Modifier and Type | Method and Description |
|---|---|
void |
annotate(Annotation annotation)
Annotates with the given annotation.
|
void |
annotateAfter(Annotation annotation)
Annotates with the given annotation after the annotatable object.
|
void |
annotateBefore(Annotation annotation)
Annotates with the given annotation before the annotatable object.
|
boolean |
containsAnnotation(java.lang.Class<? extends Annotation> type,
java.lang.String key)
Checks if this annotatable contains the specified annotation type and key.
|
<T extends Annotation> |
getAnnotation(java.lang.Class<T> type,
java.lang.String key)
Returns the annotation with the specified type and key.
|
java.util.List<Annotation> |
getAnnotations()
Returns the list of annotations.
|
<T extends Annotation> |
getAnnotations(java.lang.Class<T> type)
Returns the list of annotations with the given type.
|
java.util.List<Annotation> |
getAnnotations(int position)
Returns the list of annotations with the given relative position.
|
void |
removeAnnotations()
Remove all annotations.
|
void |
removeAnnotations(java.lang.Class<? extends Annotation> type)
Remove all annotations of the given type.
|
getChildren, getParent, removeChild, setChild, setParentvoid annotate(Annotation annotation)
void annotateAfter(Annotation annotation)
void annotateBefore(Annotation annotation)
java.util.List<Annotation> getAnnotations()
<T extends Annotation> java.util.List<T> getAnnotations(java.lang.Class<T> type)
boolean containsAnnotation(java.lang.Class<? extends Annotation> type, java.lang.String key)
<T extends Annotation> T getAnnotation(java.lang.Class<T> type, java.lang.String key)
java.util.List<Annotation> getAnnotations(int position)
void removeAnnotations()
void removeAnnotations(java.lang.Class<? extends Annotation> type)