jrapidoc-rest-plugin/src/main/java/org/jboss/resteasy/util/FindAnnotation.java
public static <T extends Annotation> T findAnnotation(Class<?> type, Annotation[] annotations, Class<T> annotation) {
        T config = FindAnnotation.findAnnotation(annotations, annotation);
        if (config == null) {
            config = type.getAnnotation(annotation);
        }
        return config;
    }
public static <T extends Annotation> T findAnnotation(Class<?> type, Annotation[] annotations, Class<T> annotation) {
        T config = FindAnnotation.findAnnotation(annotations, annotation);
        if (config == null) {
            config = type.getAnnotation(annotation);
        }
        return config;
    }
Look for an annotation in a list of annotations. If not there, see if it
is on the type provided

@param type
@param annotations
@param annnotation
@return