SELF - own typeTARGET - target typepublic abstract class Weavable<SELF extends Weavable<SELF,TARGET>,TARGET> extends Object implements Comparable<SELF>, AnnotatedElement
| Modifier | Constructor and Description |
|---|---|
protected |
Weavable(TARGET target)
Create a new
Weavable instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addAnnotations(Annotation... toAdd)
Add one or more annotations.
|
boolean |
addAnnotations(Iterable<Annotation> toAdd)
Add annotations from an
Iterable. |
boolean |
equals(Object obj) |
<T extends Annotation> |
getAnnotation(Class<T> annotationClass)
Get any instance of
annotationClass attached to getTarget(). |
Annotation[] |
getAnnotations()
Get all
Annotations associated with this element. |
Annotation[] |
getDeclaredAnnotations()
Overridden to return
getAnnotations(). |
TARGET |
getTarget()
Get the target of this
Weavable. |
int |
hashCode() |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass)
Learn whether an annotation of type
annotationClass is present. |
String |
toString()
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitcompareTogetAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByTypepublic final boolean addAnnotations(Annotation... toAdd)
toAdd - Annotation[]public final boolean addAnnotations(Iterable<Annotation> toAdd)
Iterable.toAdd - Iterable of Annotationpublic final Annotation[] getAnnotations()
Annotations associated with this element.getAnnotations in interface AnnotatedElementAnnotation[]public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
annotationClass attached to getTarget().getAnnotation in interface AnnotatedElementT - annotation typeannotationClass - Class annotation typeT instance if available, else nullpublic final Annotation[] getDeclaredAnnotations()
getAnnotations().getDeclaredAnnotations in interface AnnotatedElementAnnotation[]public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
annotationClass is present.isAnnotationPresent in interface AnnotatedElementannotationClass - to findbooleanCopyright © 2018 The Apache Software Foundation. All rights reserved.