code: @SuppressWarnings("unchecked")
      public static Set<Class<? extends AggregateRoot<?>>> includeSuperClasses(
              Collection<Class<? extends AggregateRoot>> aggregateClasses) {
          Set<Class<? extends AggregateRoot<?>>> results = new HashSet<>();
          for (Class<?> aggregateClass : aggregateClasses) {
              Class<?> classToAdd = aggregateClass;
              while (classToAdd != null) {
                  if (AggregateRoot.class.isAssignableFrom(classToAdd) && !classToAdd.equals(
                          BaseAggregateRoot.class) && !classToAdd.equals(AggregateRoot.class)) {
                      results.add((Class<? extends AggregateRoot<?>>) classToAdd);
                      classToAdd = classToAdd.getSuperclass();
                  } else {
                      break;
                  }
              }
          }
          return results;
      }
docs: Walks the class hierarchy of each class in the given collection and adds its superclasses to
  the mix.