code: public static Collection<Class<?>> getInterfaces(Class<?> object, Class<?> base)
      {
          Check.notNull(object);
          Check.notNull(base);
  
          final Collection<Class<?>> interfaces = new ArrayList<>();
          Class<?> current = object;
          while (current != null)
          {
              final Deque<Class<?>> currents = new ArrayDeque<>(filterInterfaces(current, base));
              final Deque<Class<?>> nexts = new ArrayDeque<>();
              while (!currents.isEmpty())
              {
                  nexts.clear();
                  interfaces.addAll(currents);
                  checkInterfaces(base, currents, nexts);
                  currents.clear();
                  currents.addAll(nexts);
                  nexts.clear();
              }
              current = current.getSuperclass();
          }
          return interfaces;
      }
docs: Get all declared interfaces from object.
  
  @param object The object reference (must not be <code>null</code>).
  @param base The minimum base interface (must not be <code>null</code>).
  @return The declared interfaces.
  @throws LionEngineException If invalid parameters.