Package org.jboss.modules
Class FileSystemClassPathModuleFinder
- java.lang.Object
-
- org.jboss.modules.FileSystemClassPathModuleFinder
-
- All Implemented Interfaces:
ModuleFinder
public class FileSystemClassPathModuleFinder extends java.lang.Object implements ModuleFinder
A module finder which loads modules from individual JARs or directories on the file system, supporting the JAR specification headers as well as the extendedMANIFEST
headers supported by JBoss Modules. The JAR files or modules may in turn contain nested module repositories inside of theirmodules
subdirectories. Modules in nested repositories are only visible to the module that contains them.- Author:
- David M. Lloyd, Richard Opalka
-
-
Constructor Summary
Constructors Constructor Description FileSystemClassPathModuleFinder(java.util.function.Supplier<ModuleLoader> baseModuleLoaderSupplier, java.util.function.Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader)
Construct a new instance.FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader, java.util.function.Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ModuleSpec
findModule(java.lang.String name, ModuleLoader delegateLoader)
Find a module specification for the given name.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jboss.modules.ModuleFinder
findModule
-
-
-
-
Constructor Detail
-
FileSystemClassPathModuleFinder
public FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader)
Construct a new instance.- Parameters:
baseModuleLoader
- the module loader to use to load module dependencies from (must not benull
)
-
FileSystemClassPathModuleFinder
public FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader, java.util.function.Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.- Parameters:
baseModuleLoader
- the module loader to use to load module dependencies from (must not benull
)extensionModuleLoaderSupplier
- a supplier which yields a module loader for loading extensions (must not benull
)
-
FileSystemClassPathModuleFinder
public FileSystemClassPathModuleFinder(java.util.function.Supplier<ModuleLoader> baseModuleLoaderSupplier, java.util.function.Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.- Parameters:
baseModuleLoaderSupplier
- the supplier to supply a module loader for loading dependencies (must not benull
)extensionModuleLoaderSupplier
- a supplier which yields a module loader for loading extensions (must not benull
)
-
-
Method Detail
-
findModule
public ModuleSpec findModule(java.lang.String name, ModuleLoader delegateLoader) throws ModuleLoadException
Description copied from interface:ModuleFinder
Find a module specification for the given name. The default implementation delegates to the legacyModuleFinder.findModule(ModuleIdentifier, ModuleLoader)
method for now, however this behavior will be discontinued in the future.- Specified by:
findModule
in interfaceModuleFinder
- Parameters:
name
- the module namedelegateLoader
- the module loader from which dependencies should be resolved- Returns:
- the module specification, or
null
if no specification is found for this identifier - Throws:
ModuleLoadException
-
-