Package org.jboss.modules
Class ResourceLoaderModuleFinder
- java.lang.Object
-
- org.jboss.modules.ResourceLoaderModuleFinder
-
- All Implemented Interfaces:
ModuleFinder
public final class ResourceLoaderModuleFinder extends java.lang.Object implements ModuleFinder
A module loader which loads modules which are stored inside themodules
directory of a single JAR or JAR-like root.
-
-
Constructor Summary
Constructors Constructor Description ResourceLoaderModuleFinder(ResourceLoader resourceLoader)
Construct a new instance.ResourceLoaderModuleFinder(ResourceLoader resourceLoader, java.lang.String modulesDirectory)
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
-
ResourceLoaderModuleFinder
public ResourceLoaderModuleFinder(ResourceLoader resourceLoader, java.lang.String modulesDirectory)
Construct a new instance. The given resource loader should support the nestedResourceLoader.createSubloader(String, String)
operation if<resource-root>
elements are to be supported inmodule.xml
files found within the loader.- Parameters:
resourceLoader
- the base resource loader to use (must not benull
)modulesDirectory
- the modules directory to use (must not benull
)
-
ResourceLoaderModuleFinder
public ResourceLoaderModuleFinder(ResourceLoader resourceLoader)
Construct a new instance. The given resource loader should support the nestedResourceLoader.createSubloader(String, String)
operation if<resource-root>
elements are to be supported inmodule.xml
files found within the loader.- Parameters:
resourceLoader
- the base resource loader to use (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
-
-