T - The type of the handled annotation.public static class AnnotationDescription.AnnotationInvocationHandler<T extends Annotation> extends Object implements InvocationHandler
InvocationHandler for implementing annotations.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AnnotationDescription.AnnotationInvocationHandler.DefaultValue
Represents a default value for an annotation property that is not explicitly defined by
an annotation.
|
| Modifier | Constructor and Description |
|---|---|
protected |
AnnotationInvocationHandler(Class<T> annotationType,
LinkedHashMap<Method,AnnotationDescription.AnnotationValue.Loaded<?>> values)
Creates a new invocation handler.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other) |
int |
hashCode() |
Object |
invoke(Object proxy,
Method method,
Object[] arguments) |
static <S extends Annotation> |
of(ClassLoader classLoader,
Class<S> annotationType,
Map<String,AnnotationDescription.AnnotationValue<?,?>> values) |
String |
toString() |
protected String |
toStringRepresentation()
Returns the string representation of the represented annotation.
|
protected AnnotationInvocationHandler(Class<T> annotationType, LinkedHashMap<Method,AnnotationDescription.AnnotationValue.Loaded<?>> values)
annotationType - The loaded annotation type.values - A sorted list of values of this annotation.public static <S extends Annotation> InvocationHandler of(ClassLoader classLoader, Class<S> annotationType, Map<String,AnnotationDescription.AnnotationValue<?,?>> values) throws ClassNotFoundException
S - The type of the handled annotation.classLoader - The class loader that should be used for loading the annotation's values.annotationType - The annotation's type.values - The values that the annotation contains.ClassNotFoundException - If the class of an instance that is contained by this annotation could not be found.public Object invoke(Object proxy, Method method, Object[] arguments)
invoke in interface InvocationHandlerprotected String toStringRepresentation()
Copyright © 2014–2015. All rights reserved.