Class AnnotationDescription.AnnotationInvocationHandler<T extends java.lang.annotation.Annotation>
- java.lang.Object
-
- net.bytebuddy.description.annotation.AnnotationDescription.AnnotationInvocationHandler<T>
-
- Type Parameters:
T- The type of the handled annotation.
- All Implemented Interfaces:
java.lang.reflect.InvocationHandler
- Enclosing interface:
- AnnotationDescription
public static class AnnotationDescription.AnnotationInvocationHandler<T extends java.lang.annotation.Annotation> extends java.lang.Object implements java.lang.reflect.InvocationHandlerAnInvocationHandlerfor implementing annotations.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classAnnotationDescription.AnnotationInvocationHandler.MissingValueRepresents a missing annotation property which is not represented by a default value.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAnnotationInvocationHandler(java.lang.Class<T> annotationType, java.util.LinkedHashMap<java.lang.reflect.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(java.lang.Object other)inthashCode()java.lang.Objectinvoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] argument)static <S extends java.lang.annotation.Annotation>
Sof(java.lang.ClassLoader classLoader, java.lang.Class<S> annotationType, java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> values)Creates a proxy instance for the supplied annotation type and values.protected java.lang.StringtoStringRepresentation()Returns the string representation of the represented annotation.
-
-
-
Constructor Detail
-
AnnotationInvocationHandler
protected AnnotationInvocationHandler(java.lang.Class<T> annotationType, java.util.LinkedHashMap<java.lang.reflect.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 java.lang.annotation.Annotation> S of(java.lang.ClassLoader classLoader, java.lang.Class<S> annotationType, java.util.Map<java.lang.String,? extends AnnotationValue<?,?>> values) throws java.lang.ClassNotFoundExceptionCreates 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.
- Throws:
java.lang.ClassNotFoundException- If the class of an instance that is contained by this annotation could not be found.
-
invoke
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] argument)- Specified by:
invokein interfacejava.lang.reflect.InvocationHandler
-
toStringRepresentation
protected java.lang.String toStringRepresentation()
Returns the string representation of the represented annotation.- Returns:
- The string representation of the represented annotation.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-