code: @NullSafe
    public static Set<Class<?>> getInterfaces(Class type) {
      return Optional.ofNullable(type).map(theType -> getInterfaces(type, new HashSet<>()))
        .orElse(Collections.emptySet());
    }
docs: Determines all the interfaces implemented by the given {@link Class} type.
  
  This method performs a deep analysis of all the interfaces implemented by the given {@link Class} type
  along with interfaces implemented by the {@link Class Class's} {@link Class superclass},
  up the {@link Class} hierarchy until the {@link Object} class is reached.
  
  @param type {@link Class} to evaluate.
  @return all interfaces implemented by the given {@link Class} and its superclass.
  Returns an empty {@link Set} if the given {@link Class} does not implement any interfaces.
  @see #getInterfaces(Class, Set)
  @see java.lang.Class