Package org.pkl.core.module
Class ModuleKeyFactories
java.lang.Object
org.pkl.core.module.ModuleKeyFactories
Utilities for obtaining and using module key factories.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModuleKeyFactoryA factory for file based module keys.static final ModuleKeyFactoryA factory for URL based module keys.static final ModuleKeyFactoryA factory forhttp:andhttps:module keys.static final ModuleKeyFactoryA factory forpackage:modules.static final ModuleKeyFactoryA factory forprojectpackage:modules.static final ModuleKeyFactoryA factory for standard library module keys. -
Method Summary
Modifier and TypeMethodDescriptionstatic ModuleKeyFactoryclassPath(ClassLoader classLoader) Returns a factory formodulepath:modules resolved with the given class loader.static voidcloseQuietly(Iterable<ModuleKeyFactory> factories) Closes the given factories, ignoring any exceptions.static List<ModuleKeyFactory>Returns factories registered asservice providersof typeorg.pkl.core.module.ModuleKeyFactory.static ModuleKeyFactorymodulePath(ModulePathResolver resolver) Returns a factory formodulepath:modules resolved on the given module path.
-
Field Details
-
standardLibrary
A factory for standard library module keys. -
file
A factory for file based module keys. -
http
A factory forhttp:andhttps:module keys. -
genericUrl
A factory for URL based module keys. -
pkg
A factory forpackage:modules. -
projectpackage
A factory forprojectpackage:modules.
-
-
Method Details
-
fromServiceProviders
Returns factories registered asservice providersof typeorg.pkl.core.module.ModuleKeyFactory. -
modulePath
Returns a factory formodulepath:modules resolved on the given module path.NOTE:
resolverneeds to beclosedto avoid resource leaks. -
classPath
Returns a factory formodulepath:modules resolved with the given class loader. -
closeQuietly
Closes the given factories, ignoring any exceptions.
-