Package org.pkl.core.module
Class ModuleKeyFactories
- java.lang.Object
-
- org.pkl.core.module.ModuleKeyFactories
-
public final class ModuleKeyFactories extends java.lang.ObjectUtilities for obtaining and using module key factories.
-
-
Field Summary
Fields Modifier and Type Field Description static ModuleKeyFactoryfileA factory for file based module keys.static ModuleKeyFactorygenericUrlA factory for URL based module keys.static ModuleKeyFactorypkgA factory forpackage:modules.static ModuleKeyFactoryprojectpackageA factory forprojectpackage:modules.static ModuleKeyFactorystandardLibraryA factory for standard library module keys.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ModuleKeyFactoryclassPath(java.lang.ClassLoader classLoader)Returns a factory formodulepath:modules resolved with the given class loader.static voidcloseQuietly(java.lang.Iterable<ModuleKeyFactory> factories)Closes the given factories, ignoring any exceptions.static java.util.List<ModuleKeyFactory>fromServiceProviders()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 Detail
-
standardLibrary
public static final ModuleKeyFactory standardLibrary
A factory for standard library module keys.
-
file
public static final ModuleKeyFactory file
A factory for file based module keys.
-
genericUrl
public static final ModuleKeyFactory genericUrl
A factory for URL based module keys.
-
pkg
public static final ModuleKeyFactory pkg
A factory forpackage:modules.
-
projectpackage
public static final ModuleKeyFactory projectpackage
A factory forprojectpackage:modules.
-
-
Method Detail
-
fromServiceProviders
public static java.util.List<ModuleKeyFactory> fromServiceProviders()
Returns factories registered asservice providersof typeorg.pkl.core.module.ModuleKeyFactory.
-
modulePath
public static ModuleKeyFactory modulePath(ModulePathResolver resolver)
Returns a factory formodulepath:modules resolved on the given module path.NOTE:
resolverneeds to beclosedto avoid resource leaks.
-
classPath
public static ModuleKeyFactory classPath(java.lang.ClassLoader classLoader)
Returns a factory formodulepath:modules resolved with the given class loader.
-
closeQuietly
public static void closeQuietly(java.lang.Iterable<ModuleKeyFactory> factories)
Closes the given factories, ignoring any exceptions.
-
-