private static void collectSupers(@NotNull Class<?> classKey, @NotNull Set<? super String> allSupers) {
    allSupers.add(classKey.getName());
    for (Class<?> anInterface : classKey.getInterfaces()) {
      collectSupers(anInterface, allSupers);
    }

    Class<?> superClass = classKey.getSuperclass();
    if (superClass != null) {
      collectSupers(superClass, allSupers);
    }
  }
private static void collectSupers(@NotNull Class<?> classKey, @NotNull Set<? super String> allSupers)