Package org.pkl.core.module
Class ResolvedModuleKeys
java.lang.Object
org.pkl.core.module.ResolvedModuleKeys
Utilities for obtaining and using resolved module keys.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResolvedModuleKeydelegated(ResolvedModuleKey delegate, ModuleKey original) Creates a resolved module key that behaves likedelegate, except withoriginalas its original module key.static ResolvedModuleKeyCreates a resolved module key backed by the given file path.static ResolvedModuleKeyCreates a resolved module key backed by the given URL.static ResolvedModuleKeyCreates a resolved module key backed by the given source code.
-
Method Details
-
file
Creates a resolved module key backed by the given file path. The resulting module will be loaded from that file path and cached using the given URI as cache key. -
url
Creates a resolved module key backed by the given URL. The resulting module will be loaded from that URL and cached using the given URI as cache key. -
virtual
public static ResolvedModuleKey virtual(ModuleKey original, URI uri, String sourceText, boolean cached) Creates a resolved module key backed by the given source code. Ifcachedistrue, the resulting module will be cached using the given URI as cache key. -
delegated
Creates a resolved module key that behaves likedelegate, except withoriginalas its original module key.
-