202203204205206207208209210211212
if (type == Parent.class) { return new ParentFactory(); } if (type == Dependency.class) { return new DependencyFactory(); } if (type == Exclusion.class) { return new ExclusionFactory(); }