Package org.pkl.core.runtime
Class ModuleCache
- java.lang.Object
-
- org.pkl.core.runtime.ModuleCache
-
public final class ModuleCache extends java.lang.ObjectCaches modules by the URI originally specified in the importing module, and also by the resolved URI from which the module was eventually loaded. Caching by original URI avoids any overhead incurred by resolving a module multiple times. Caching by resolved URI avoids any overhead incurred by evaluating a module multiple times, and also avoids any inconsistencies caused by module contents changing during evaluation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceModuleCache.ModuleInitializer
-
Constructor Summary
Constructors Constructor Description ModuleCache()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VmTypedgetOrLoad(ModuleKey moduleKey, SecurityManager securityManager, ModuleResolver moduleResolver, java.util.function.Supplier<VmTyped> moduleInstantiator, ModuleCache.ModuleInitializer moduleInitializer, @Nullable ImportNode importNode)
-
-
-
Method Detail
-
getOrLoad
public VmTyped getOrLoad(ModuleKey moduleKey, SecurityManager securityManager, ModuleResolver moduleResolver, java.util.function.Supplier<VmTyped> moduleInstantiator, ModuleCache.ModuleInitializer moduleInitializer, @Nullable ImportNode importNode)
-
-