code: public static @NonNull ModuleLayer createLayer(final @NonNull ModuleLayer parent, final @NonNull Set<Path> paths) {
      final ModuleFinder finder = ModuleFinder.of(paths.toArray(new Path[paths.size()]));
      final Set<String> modules = finder.findAll().stream().map(reference -> reference.descriptor().name()).collect(Collectors.toSet());
      final Configuration configuration = parent.configuration().resolve(finder, ModuleFinder.of(), modules);
      final ClassLoader loader = ClassLoader.getSystemClassLoader();
      return parent.defineModulesWithOneLoader(configuration, loader);
    }
docs: Creates a new module layer from a parent layer and a set of paths.
  
  @param parent the parent layer
  @param paths the paths
  @return a new layer