241242243244245246247
List<String> classNames = new ArrayList<>(); for (Object o : dependents) { classNames.add(o.getClass().getSimpleName()); } classNames.add(instance.getClass().getSimpleName()); return new CircularDependencyException (forClassName, classNames); }