public Pair<ModulePath, Collection<File>> splitPath(File chunkModuleInfo, Set<? extends File> chunkOutputs, Collection<? extends File> path, Collection<String> addReads) {
    if (myModuleFinderCreateMethod == null) {
      // the module API is not available
      return Pair.create(ModulePath.create(path), Collections.emptyList());
    }
    final ModulePath.Builder mpBuilder = ModulePath.newBuilder();
    final List<File> classpath = new ArrayList<>();

    final Set<String> allRequired = collectRequired(chunkModuleInfo, Iterators.filter(path, file -> !chunkOutputs.contains(file)));
    allRequired.addAll(addReads);
    for (File file : path) {
      if (chunkOutputs.contains(file)) {
        mpBuilder.add(null, file);
      }
      else {
        final ModuleInfo info = getModuleInfo(file);
        if (allRequired.contains(info.name)) {
          // storing only names for automatic modules in "exploded" form.
          // for all other kinds of roots module-name is correctly determined by javac itself
          mpBuilder.add(info.isAutomaticExploded? info.name : null, file);
        }
        else {
          classpath.add(file);
        }
      }
    }
    return Pair.create(mpBuilder.create(), Collections.unmodifiableList(classpath));
  }
public Pair<ModulePath, Collection<File>> splitPath(File chunkModuleInfo, Set<? extends File> chunkOutputs, Collection<? extends File> path, Collection<String> addReads)