Class AnnotationDescription.AnnotationInvocationHandler<T extends Annotation>
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationDescription.AnnotationInvocationHandler<T>
-
- Type Parameters:
T- The type of the handled annotation.
- All Implemented Interfaces:
InvocationHandler
- Enclosing interface:
- AnnotationDescription
public static class AnnotationDescription.AnnotationInvocationHandler<T extends Annotation> extends Object implements InvocationHandler
AnInvocationHandlerfor implementing annotations.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotationInvocationHandler(Class<T> annotationType, LinkedHashMap<Method,AnnotationValue.Loaded<?>> values)Creates a new invocation handler.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)inthashCode()Objectinvoke(Object proxy, Method method, Object[] argument)static <S extends Annotation>
Sof(ClassLoader classLoader, Class<S> annotationType, Map<String,? extends AnnotationValue<?,?>> values)Creates a proxy instance for the supplied annotation type and values.protected StringtoStringRepresentation()Returns the string representation of the represented annotation.
-
-
-
Constructor Detail
-
AnnotationInvocationHandler
protected AnnotationInvocationHandler(Class<T> annotationType, LinkedHashMap<Method,AnnotationValue.Loaded<?>> values)
Creates a new invocation handler.- Parameters:
annotationType- The loaded annotation type.values- A sorted list of values of this annotation.
-
-
Method Detail
-
of
public static <S extends Annotation> S of(ClassLoader classLoader, Class<S> annotationType, Map<String,? extends AnnotationValue<?,?>> values)
Creates a proxy instance for the supplied annotation type and values.- Type Parameters:
S- The type of the handled annotation.- Parameters:
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.- Returns:
- A proxy for the annotation type and values.
-
invoke
public Object invoke(Object proxy, Method method, Object[] argument)
- Specified by:
invokein interfaceInvocationHandler
-
toStringRepresentation
protected String toStringRepresentation()
Returns the string representation of the represented annotation.- Returns:
- The string representation of the represented annotation.
-
-