public static Collection<Class<?>> getAllInterfaces(final Class<?> aClass, final Collection<Class<?>> result) {
    final Class<?>[] interfaces = aClass.getInterfaces();
    ContainerUtil.addAll(result, interfaces);
    if (aClass.getSuperclass() != null) {
      getAllInterfaces(aClass.getSuperclass(), result);
    }
    for (Class<?> anInterface : interfaces) {
      getAllInterfaces(anInterface, result);
    }
    return result;
  }
public static Collection<Class<?>> getAllInterfaces(final Class<?> aClass, final Collection<Class<?>> result)