docs: private static void collectInterfaces(Set<Class<?>> interfaces, Class<?> anInterface) {
          interfaces.add(anInterface);
          for (Class<?> superInterface : anInterface.getInterfaces()) {
              collectInterfaces(interfaces, superInterface);
          }
      }