public abstract class Wrapper<T> extends Object implements AnnotatedElement
Wrapper.toAnnotatedElement(converter).isAnnotationPresent(HandleNull.class);In the future there may be other methods to access other kind of class information.
Modifier | Constructor and Description |
---|---|
protected |
Wrapper() |
protected |
Wrapper(T wrappedObject) |
Modifier and Type | Method and Description |
---|---|
protected void |
decorate(T object) |
<A extends Annotation> |
getAnnotation(Class<A> aClass) |
Annotation[] |
getAnnotations() |
Annotation[] |
getDeclaredAnnotations() |
boolean |
isAnnotationPresent(Class<? extends Annotation> annotationClass) |
static boolean |
isOfType(Object object,
Class<?> clazz) |
static boolean |
isWrapped(Object object) |
static AnnotatedElement |
toAnnotatedElement(Object object)
This method acts as an adapter to AnnotatedElement, use it when you need to work on a
converter annotations.
|
T |
unwrap() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotationsByType
protected volatile T wrapped
protected Wrapper()
protected Wrapper(T wrappedObject)
public Annotation[] getAnnotations()
getAnnotations
in interface AnnotatedElement
public <A extends Annotation> A getAnnotation(Class<A> aClass)
getAnnotation
in interface AnnotatedElement
public Annotation[] getDeclaredAnnotations()
getDeclaredAnnotations
in interface AnnotatedElement
public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
isAnnotationPresent
in interface AnnotatedElement
protected void decorate(T object)
public T unwrap()
public static AnnotatedElement toAnnotatedElement(Object object)
object
- may be an instance of converter for examplepublic static boolean isWrapped(Object object)
Copyright © 2019. All rights reserved.