code: public static Stream<Class<?>> getInterfacesAsStream(Class<?> clazz) {
          return getSuperclassesAsStream(clazz, true)
                  .flatMap(superClass -> Stream.concat(
                          superClass.isInterface() ? Stream.of(superClass) : Stream.empty(),
                          Arrays.stream(superClass.getInterfaces()).flatMap(ClassHelper::getInterfacesAsStream)))
                  .distinct();
      }
docs: Get a stream of all interfaces of the given class including extended interfaces and interfaces of all
  superclasses.
  If the given class is an interface, it will be included in the result, otherwise not.
  
  @param clazz The class to get the interfaces for.
  @return The stream of interfaces of the given class.