Package org.pkl.core.module
Interface ResolvedModuleKey
-
public interface ResolvedModuleKeySPI for identifying a resolved module and loading its source code.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ModuleKeygetOriginal()java.net.URIgetUri()Returns the URI of the resolved module.java.lang.StringloadSource()Loads module(s) fromgetUri().
-
-
-
Method Detail
-
getOriginal
ModuleKey getOriginal()
-
getUri
java.net.URI getUri()
Returns the URI of the resolved module. This URI identifies the location that the module's source code will be loaded from. IfModuleKey.isCached()istrue, this URI will also be used as a cache key for the module.
-
loadSource
java.lang.String loadSource() throws java.io.IOExceptionLoads module(s) fromgetUri(). All necessarySecurityManagerchecks have already been performed before invoking this method.In some cases, a module's source code is already loaded as part of resolving the module, typically for performance reasons. In such a case, this method will not need to perform any additional I/O.
- Throws:
java.io.IOException- if an I/O error occurs while loading the source code
-
-