public static <A extends Annotation>A createAnnotation(Class<? extends Annotation> annotationType,AnnotationMember[] elements){
  AnnotationFactory factory=new AnnotationFactory(annotationType,elements);
  return (A)Proxy.newProxyInstance(annotationType.getClassLoader(),new Class[]{annotationType},factory);
}

public static < A extends Annotation > A createAnnotation ( Class < ? extends Annotation > annotationType , AnnotationMember [ ] elements ) { AnnotationFactory factory = new AnnotationFactory ( annotationType , elements ) ; return ( A ) Proxy . newProxyInstance ( annotationType . getClassLoader ( ) , new Class [ ] { annotationType } , factory ) ; }
provides a new annotation instance .
