Supports inline instantiation of annotation type instances.
An instance of an annotation type may be obtained by subclassing AnnotationLiteral.
public abstract class PayByQualifier extends AnnotationLiteral<PayBy> implements PayBy {}
An extension of AnnotationLiteral must do two things:
- Must have the target annotation as its generic type
- Must implement the target type
In particular, in-line anonymous extensions of AnnotationLiteral will not work because in-line anonymous extensions of AnnotationLiteral cannot implement the target annotation
@author jwells
@param < T> the annotation type