Package org.jboss.modules

# Interface ModuleFinder

All Known Subinterfaces:
  `IterableModuleFinder`

All Known Implementing Classes:
  `FileSystemClassPathModuleFinder`, `JarModuleFinder`, `JDKModuleFinder`, `LocalModuleFinder`, `ResourceLoaderModuleFinder`

public interface ModuleFinder
A locator for module definitions.

Author:
  David M. Lloyd

## Method Summary

Modifier and Type
Method
Description
`default ModuleSpec`
`findModule(String name, ModuleLoader delegateLoader)`
Find a module specification for the given name.
`default ModuleSpec`
`findModule(ModuleIdentifier moduleIdentifier, ModuleLoader delegateLoader)`
Deprecated, for removal: This API element is subject to removal in a future version.
Implement `findModule(String, ModuleLoader)` instead.

## Method Details

### findModule

default ModuleSpec findModule(String name, ModuleLoader delegateLoader) throws ModuleLoadException
Find a module specification for the given name. The default implementation delegates to the legacy `findModule(ModuleIdentifier, ModuleLoader)` method for now, however this behavior will be discontinued in the future.

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`

### findModule

@Deprecated(forRemoval=true) default ModuleSpec findModule(ModuleIdentifier moduleIdentifier, ModuleLoader delegateLoader) throws ModuleLoadException
Deprecated, for removal: This API element is subject to removal in a future version.
Implement `findModule(String, ModuleLoader)` instead.
Find a module specification for the given identifier. The default implementation returns `null`. This method will never be called by the module system unless `findModule(String, ModuleLoader)` is left unimplemented.

Parameters:
  `moduleIdentifier` - the module identifier
  `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`