private static <A extends Annotation> A getOverriddenAnnotation(
            Class<A> annotationClass, Optional<Method> annotatedMethod,
            OptionalInt annotatedParamNumber) {
        if (annotatedMethod.isEmpty()) {
            throw new IllegalArgumentException("Must be supplied with either an annotated class or method to search" +
                    " but neither were provided.");
        }
        final Method method = annotatedMethod.get();
        final Class<?> methodClass = method.getDeclaringClass();
        final String name = method.getName();
        final Class<?>[] params = method.getParameterTypes();

        // Check super classes
        final Class<?> superclass = methodClass.getSuperclass();
        if (superclass != null) {
            final A annotation =
                    getOverriddenAnnotationFrom(annotationClass, superclass, name, params, annotatedParamNumber);
            if (annotation != null) {
                return annotation;
            }
        }

        // Check interfaces
        for (final Class<?> interfaze : methodClass.getInterfaces()) {
            final A annotation =
                    getOverriddenAnnotationFrom(annotationClass, interfaze, name, params, annotatedParamNumber);
            if (annotation != null) {
                return annotation;
            }
        }

        return null;
    }
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