code: @SuppressWarnings("unchecked")
  	public static <T extends Annotation> T getAnnotation(Annotation ann, Class<T> annotationType) {
  		if (annotationType.isInstance(ann)) {
  			return (T) ann;
  		}
  		try {
  			return ann.annotationType().getAnnotation(annotationType);
  		}
  		catch (Exception ex) {
  			// Assuming nested Class values not resolvable within annotation attributes...
  			logIntrospectionFailure(ann.annotationType(), ex);
  			return null;
  		}
  	}
docs: Get a single {@link Annotation} of {@code annotationType} from the supplied
  annotation: either the given annotation itself or a meta-annotation thereof.
  @param ann the Annotation to check
  @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 4.0