code: public static <T extends Annotation> T getAnnotation(AnnotatedElement annotatedElement, Class<T> annotationType) {
  		try {
  			T ann = annotatedElement.getAnnotation(annotationType);
  			if (ann == null) {
  				for (Annotation metaAnn : annotatedElement.getAnnotations()) {
  					ann = metaAnn.annotationType().getAnnotation(annotationType);
  					if (ann != null) {
  						break;
  					}
  				}
  			}
  			return ann;
  		}
  		catch (Exception ex) {
  			// Assuming nested Class values not resolvable within annotation attributes...
  			logIntrospectionFailure(annotatedElement, ex);
  			return null;
  		}
  	}
docs: Get a single {@link Annotation} of {@code annotationType} from the supplied
  Method, Constructor or Field. Meta-annotations will be searched if the annotation
  is not declared locally on the supplied element.
  @param annotatedElement the Method, Constructor or Field from which to get the annotation
  @param annotationType the annotation type to look for, both locally and as a meta-annotation
  @return the matching annotation, or {@code null} if none found
  @since 3.1