Package org.pkl.core.module
Class ModulePathResolver
- java.lang.Object
-
- org.pkl.core.module.ModulePathResolver
-
- All Implemented Interfaces:
java.lang.AutoCloseable
public class ModulePathResolver extends java.lang.Object implements java.lang.AutoCloseableResolvesmodulepathURIs from ZIP or JAR files, or from directory paths.NOTE: Do not initialize two resolvers for the same jar or zip file. Instead, share the same resolver for that jar or zip file.
-
-
Constructor Summary
Constructors Constructor Description ModulePathResolver(java.lang.Iterable<java.nio.file.Path> modulePath)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()static ModulePathResolverempty()booleanhasElement(java.net.URI elementUri)java.nio.file.Pathresolve(java.net.URI uri)
-
-
-
Method Detail
-
empty
public static ModulePathResolver empty()
-
resolve
public java.nio.file.Path resolve(java.net.URI uri) throws java.io.IOException- Throws:
java.io.IOException
-
hasElement
public boolean hasElement(java.net.URI elementUri)
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable
-
-