Exemplo n.º 1
0
 @SuppressWarnings({"unchecked"})
 public static <T extends Annotation> T buildRandomAnnotation(Class<T> annotationClass) {
   return (T)
       Proxy.newProxyInstance(
           annotationClass.getClassLoader(),
           new Class<?>[] {annotationClass},
           new AnnotationHandler(AnnotationMetadata.randomAnnotation(annotationClass)));
 }