Package org.jboss.modules

# Class FileSystemClassPathModuleFinder

java.lang.Object
org.jboss.modules.FileSystemClassPathModuleFinder

All Implemented Interfaces:
  `ModuleFinder`

public class FileSystemClassPathModuleFinder extends 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 extended `MANIFEST` headers supported by JBoss Modules. The JAR files or modules may in turn contain nested module repositories inside of their `modules` 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(Supplier<ModuleLoader> baseModuleLoaderSupplier, Supplier<ModuleLoader> extensionModuleLoaderSupplier)`
Construct a new instance.
`FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader)`
Construct a new instance.
`FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader, Supplier<ModuleLoader> extensionModuleLoaderSupplier)`
Construct a new instance.

## Method Summary

Modifier and Type
Method
Description
`ModuleSpec`
`findModule(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 Details

### FileSystemClassPathModuleFinder

public FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader)
Construct a new instance.

Parameters:
  `baseModuleLoader` - the module loader to use to load module dependencies from (must not be `null`)

### FileSystemClassPathModuleFinder

public FileSystemClassPathModuleFinder(ModuleLoader baseModuleLoader, Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.

Parameters:
  `baseModuleLoader` - the module loader to use to load module dependencies from (must not be `null`)
  `extensionModuleLoaderSupplier` - a supplier which yields a module loader for loading extensions (must not be `null`)

### FileSystemClassPathModuleFinder

public FileSystemClassPathModuleFinder(Supplier<ModuleLoader> baseModuleLoaderSupplier, Supplier<ModuleLoader> extensionModuleLoaderSupplier)
Construct a new instance.

Parameters:
  `baseModuleLoaderSupplier` - the supplier to supply a module loader for loading dependencies (must not be `null`)
  `extensionModuleLoaderSupplier` - a supplier which yields a module loader for loading extensions (must not be `null`)

## Method Details

### findModule

public ModuleSpec findModule(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 legacy `ModuleFinder.findModule(ModuleIdentifier, ModuleLoader)` method for now, however this behavior will be discontinued in the future.

Specified by:
  `findModule` in interface `ModuleFinder`
Parameters:
  `name` - the module name
  `delegateLoader` - 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`