void (Class<?> clazz, List<Class<?>> supers) { Class<?>[] interfaces = clazz.getInterfaces(); addAll(supers, interfaces); for (Class<?> anInterface : interfaces) { supers.addAll(getAllSupers(anInterface)); } }