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
An
InvocationHandler for implementing annotations.-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAnnotationInvocationHandler(Class<T> annotationType, LinkedHashMap<Method, AnnotationValue.Loaded<?>> values) Creates a new invocation handler. -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()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 StringReturns the string representation of the represented annotation.
-
Constructor Details
-
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 Details
-
of
public static <S extends Annotation> S of(@MaybeNull 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
- Specified by:
invokein interfaceInvocationHandler
-
toStringRepresentation
Returns the string representation of the represented annotation.- Returns:
- The string representation of the represented annotation.
-
hashCode
-
equals
-