Top Description Fields Constructors Methods
org.jboss.modules

public Class FileSystemClassPathModuleFinder

extends Object
implements ModuleFinder
Class Inheritance
All Implemented Interfaces
org.jboss.modules.ModuleFinder
Known Direct Subclasses
org.jboss.modules.ClassPathModuleFinder
Static Imports
org.jboss.modules.Utils.DEPENDENCIES, .Utils.EXPORT, .Utils.MODULES_DIR, .Utils.MODULE_VERSION, .Utils.OPTIONAL, .Utils.SERVICES

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.
Authors
David M. Lloyd, Richard Opalka

Field Summary

Modifier and TypeField and Description
private final Supplier<ModuleLoader>
private final AccessControlContext
context

Deprecated as a consequence of AccessControlContext being deprecated.
pack-priv static final ModuleLoader
pack-priv static final SimpleSupplier<ModuleLoader>
private final Supplier<ModuleLoader>
private static final PathFilter

Constructor Summary

AccessConstructor and Description
public
FileSystemClassPathModuleFinder(final ModuleLoader
the module loader to use to load module dependencies from (must not be null)
baseModuleLoader
)

Construct a new instance.

public
FileSystemClassPathModuleFinder(final ModuleLoader
the module loader to use to load module dependencies from (must not be null)
baseModuleLoader
,
final Supplier<ModuleLoader>
a supplier which yields a module loader for loading extensions (must not be null)
extensionModuleLoaderSupplier
)

Construct a new instance.

public
FileSystemClassPathModuleFinder(final Supplier<ModuleLoader>
the supplier to supply a module loader for loading dependencies (must not be null)
baseModuleLoaderSupplier
,
final Supplier<ModuleLoader>
a supplier which yields a module loader for loading extensions (must not be null)
extensionModuleLoaderSupplier
)

Construct a new instance.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
addClassPathDependencies(final ModuleSpec.Builder builder, final ModuleLoader moduleLoader, final Path path, final Attributes mainAttributes)

pack-priv void
addExtensionDependencies(final ModuleSpec.Builder builder, final Attributes mainAttributes, final ModuleLoader extensionModuleLoader)

pack-priv void
addModuleDependencies(final ModuleSpec.Builder builder, final ModuleLoader fatModuleLoader, final Attributes mainAttributes)

pack-priv void
addPermissions(final ModuleSpec.Builder builder, final ResourceLoader resourceLoader, final ModuleLoader moduleLoader)

pack-priv void
addSelfContent(final ModuleSpec.Builder builder, final ResourceLoader resourceLoader)

pack-priv void
pack-priv void
public ModuleSpec
findModule(final String
the module name
name
,
final ModuleLoader
the module loader from which dependencies should be resolved
delegateLoader
)

Overrides default org.jboss.modules.ModuleFinder.findModule.

Find a module specification for the given name.
pack-priv void
setMainClass(final ModuleSpec.Builder builder, final Attributes mainAttributes)

pack-priv void
setModuleVersion(final ModuleSpec.Builder builder, final Attributes mainAttributes)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

baseModuleLoaderSupplierback to summary
private final Supplier<ModuleLoader> baseModuleLoaderSupplier
contextback to summary
private final AccessControlContext context

Deprecated

as a consequence of AccessControlContext being deprecated. See corresponding docs for further information.

EMPTY_MODULE_LOADERback to summary
pack-priv static final ModuleLoader EMPTY_MODULE_LOADER
EMPTY_MODULE_LOADER_SUPPLIERback to summary
pack-priv static final SimpleSupplier<ModuleLoader> EMPTY_MODULE_LOADER_SUPPLIER
extensionModuleLoaderSupplierback to summary
private final Supplier<ModuleLoader> extensionModuleLoaderSupplier
NO_MODULES_DIRback to summary
private static final PathFilter NO_MODULES_DIR

Constructor Detail

FileSystemClassPathModuleFinderback to summary
public FileSystemClassPathModuleFinder(final ModuleLoader baseModuleLoader)

Construct a new instance.

Parameters
baseModuleLoader:ModuleLoader

the module loader to use to load module dependencies from (must not be null)

FileSystemClassPathModuleFinderback to summary
public FileSystemClassPathModuleFinder(final ModuleLoader baseModuleLoader, final Supplier<ModuleLoader> extensionModuleLoaderSupplier)

Construct a new instance.

Parameters
baseModuleLoader:ModuleLoader

the module loader to use to load module dependencies from (must not be null)

extensionModuleLoaderSupplier:Supplier<ModuleLoader>

a supplier which yields a module loader for loading extensions (must not be null)

FileSystemClassPathModuleFinderback to summary
public FileSystemClassPathModuleFinder(final Supplier<ModuleLoader> baseModuleLoaderSupplier, final Supplier<ModuleLoader> extensionModuleLoaderSupplier)

Construct a new instance.

Parameters
baseModuleLoaderSupplier:Supplier<ModuleLoader>

the supplier to supply a module loader for loading dependencies (must not be null)

extensionModuleLoaderSupplier:Supplier<ModuleLoader>

a supplier which yields a module loader for loading extensions (must not be null)

Method Detail

addClassPathDependenciesback to summary
pack-priv void addClassPathDependencies(final ModuleSpec.Builder builder, final ModuleLoader moduleLoader, final Path path, final Attributes mainAttributes)
addExtensionDependenciesback to summary
pack-priv void addExtensionDependencies(final ModuleSpec.Builder builder, final Attributes mainAttributes, final ModuleLoader extensionModuleLoader)
addModuleDependenciesback to summary
pack-priv void addModuleDependencies(final ModuleSpec.Builder builder, final ModuleLoader fatModuleLoader, final Attributes mainAttributes)
addPermissionsback to summary
pack-priv void addPermissions(final ModuleSpec.Builder builder, final ResourceLoader resourceLoader, final ModuleLoader moduleLoader)
addSelfContentback to summary
pack-priv void addSelfContent(final ModuleSpec.Builder builder, final ResourceLoader resourceLoader)
addSelfDependencyback to summary
pack-priv void addSelfDependency(final ModuleSpec.Builder builder)
addSystemDependenciesback to summary
pack-priv void addSystemDependencies(final ModuleSpec.Builder builder)
findModuleback to summary
public ModuleSpec findModule(final String name, final ModuleLoader delegateLoader) throws ModuleLoadException

Overrides default org.jboss.modules.ModuleFinder.findModule.

Doc from org.jboss.modules.ModuleFinder.findModule.

Find a module specification for the given name. The default implementation delegates to the legacy findModule(ModuleIdentifier, ModuleLoader) method.

Parameters
name:String

the module name

delegateLoader:ModuleLoader

the module loader from which dependencies should be resolved

Returns:ModuleSpec

the module specification, or null if no specification is found for this identifier

setMainClassback to summary
pack-priv void setMainClass(final ModuleSpec.Builder builder, final Attributes mainAttributes)
setModuleVersionback to summary
pack-priv void setModuleVersion(final ModuleSpec.Builder builder, final Attributes mainAttributes)