Class AnnotationInvocationHandler

java.lang.Object
io.leangen.geantyref.AnnotationInvocationHandler
All Implemented Interfaces:
Serializable, Annotation, InvocationHandler

class AnnotationInvocationHandler extends Object implements Annotation, InvocationHandler, Serializable
An implementation of Annotation that mimics the behavior of normal annotations. It is an InvocationHandler, meant to be used via TypeFactory.annotation(Class, Map).

The constructor checks that the all the elements required by the annotation interface are provided and that the types are compatible. If extra elements are provided, they are ignored. If a value is of an incompatible type is provided or no value is provided for an element without a default value, AnnotationFormatException is thrown.

Note: equals(Object) and hashCode() and implemented as specified by Annotation, so instances are safe to mix with normal annotations.

See Also: