code: public static LinkedHashSet<Class<?>> getInterfaces(Class<?> clazz) throws ReflectionException {
          Validate.notNull(clazz);
  
          try {
              LinkedHashSet<Class<?>> interfaces = new LinkedHashSet<>();
              interfaces.addAll(Arrays.asList(clazz.getInterfaces()));
              LinkedHashSet<Class<?>> superclasses = getSuperclasses(clazz);
              for (Class<?> superclass : superclasses) {
                  interfaces.addAll(Arrays.asList(superclass.getInterfaces()));
              }
              return interfaces;
          } catch (Exception e) {
              throw new ReflectionException(e);
          }
      }
docs: Returns all implemented interfaces of the given class.
  
  @param clazz Class to read interfaces from.
  @return {@link LinkedHashSet} of interfaces.
  @throws ReflectionException If interfaces can't be read.