public static <A extends Annotation> A getInheritedClassAnnotation(
            Class<A> annotationClass, Class<?> annotatedClass) {
        //Check class itself
        A annotation = annotatedClass.getAnnotation(annotationClass);

        //Check super classes.
        if (annotation == null) {
            final Class<?> superclass = annotatedClass.getSuperclass();
            if (superclass != null) {
                annotation = getInheritedClassAnnotation(annotationClass, superclass);
                if (annotation != null) {
                    return annotation;
                }
            }

            //Check interfaces
            for (final Class<?> interfaze : annotatedClass.getInterfaces()) {
                annotation = getInheritedClassAnnotation(annotationClass, interfaze);

                if (annotation != null) {
                    return annotation;
                }
            }
        }

        return annotation;
    }
Class that finds annotations on superclasses/interfaces of supplied instance.
<p>
Credit for initial implementation goes to the author of this answer on Stack Overflow: https://stackoverflow.com/a/17281097
stroom-event-logging-rs/stroom-event-logging-rs-impl/src/main/java/stroom/event/logging/rs/impl/AnnotationUtil.java