ModulePath (Collection<? extends File> path) { if (path.isEmpty()) { return EMPTY; } final Collection<File> files = Collections.unmodifiableCollection(path); return new ModulePath() { @Override public Collection<? extends File> getPath() { return files; } @Override public String getModuleName(File pathElement) { return null; } }; }