@Override public <A extends Annotation> A getTypeAnnotation(Class<?> annotatedType, Class<A> annotation) { A result = getClassAnnotation(annotatedType, annotation); Class<?> currentClass = annotatedType; while (result == null) { result = getInterfacesAnnotation(currentClass, annotation); currentClass = currentClass.getSuperclass(); if (currentClass == null) { break; } } return result; }
A result = getInterfacesAnnotation(interfaces[i], annotation); if (result != null) { return result;