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
Annotation s 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, wait
compareTo
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
public final boolean addAnnotations(Annotation... toAdd)
toAdd
- Annotation
[]public final boolean addAnnotations(Iterable<Annotation> toAdd)
Iterable
.toAdd
- Iterable
of Annotation
public final Annotation[] getAnnotations()
Annotation
s associated with this element.getAnnotations
in interface AnnotatedElement
Annotation
[]public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
annotationClass
attached to getTarget()
.getAnnotation
in interface AnnotatedElement
T
- annotation typeannotationClass
- Class
annotation typeT
instance if available, else null
public final Annotation[] getDeclaredAnnotations()
getAnnotations()
.getDeclaredAnnotations
in interface AnnotatedElement
Annotation
[]public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
annotationClass
is present.isAnnotationPresent
in interface AnnotatedElement
annotationClass
- to findboolean
Copyright © 2018 The Apache Software Foundation. All rights reserved.