< prev index next >

jdk/src/jdk.jlink/share/classes/jdk/tools/jlink/internal/ResourcePoolEntryFactory.java

Print this page

        

*** 49,58 **** --- 49,64 ---- public static ResourcePoolEntry create(ResourcePoolEntry original, Path file) { return new PathResourcePoolEntry(original.moduleName(), original.path(), original.type(), file); } + public static ResourcePoolEntry createSymbolicLink(String path, + ResourcePoolEntry.Type type, + ResourcePoolEntry target) { + return new SymLinkResourcePoolEntry(moduleFrom(path), path, type, target); + } + private static String moduleFrom(String path) { Objects.requireNonNull(path); if (path.isEmpty() || path.charAt(0) != '/') { throw new IllegalArgumentException(path + " must start with /"); }
< prev index next >