@ SuppressWarnings ( "unchecked" ) public static < T extends Annotation > T createAnnotation ( final Class < T > clazz ) { return ( T ) Proxy . newProxyInstance ( clazz . getClassLoader ( ) , new Class [ ] { clazz , Annotation . class } , new SimpleAnnoInvocationHandler ( clazz ) ) ; }
Create an annotation instance from annotation class .