
public final class LocalModuleFinder extends Object implements ModuleFinder
module.xml descriptors.| Constructor and Description |
|---|
LocalModuleFinder()
Construct a new instance, using the
module.path system property or the JAVA_MODULEPATH environment variable
to get the list of module repository roots. |
LocalModuleFinder(boolean supportLayersAndAddOns)
Construct a new instance, using the
module.path system property or the JAVA_MODULEPATH environment variable
to get the list of module repository roots. |
LocalModuleFinder(File[] repoRoots)
Construct a new instance.
|
LocalModuleFinder(File[] repoRoots,
PathFilter pathFilter)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
ModuleSpec |
findModule(ModuleIdentifier identifier,
ModuleLoader delegateLoader)
Find a module specification for the given identifier.
|
static ModuleSpec |
parseModuleXmlFile(ModuleIdentifier identifier,
ModuleLoader delegateLoader,
File... roots)
Parse a
module.xml file and return the corresponding module specification. |
String |
toString() |
public LocalModuleFinder(File[] repoRoots, PathFilter pathFilter)
repoRoots - the repository roots to usepathFilter - the path filter to usepublic LocalModuleFinder(File[] repoRoots)
repoRoots - the repository roots to usepublic LocalModuleFinder()
module.path system property or the JAVA_MODULEPATH environment variable
to get the list of module repository roots.
This is equivalent to a call to LocalModuleFinder(true).
public LocalModuleFinder(boolean supportLayersAndAddOns)
module.path system property or the JAVA_MODULEPATH environment variable
to get the list of module repository roots.supportLayersAndAddOns - true if the identified module repository roots should be checked for
an internal structure of child "layer" and "add-on" directories that may also
be treated as module roots lower in precedence than the parent root. Any "layers"
subdirectories whose names are specified in a layers.conf file found in
the module repository root will be added in the precedence of order specified
in the layers.conf file; all "add-on" subdirectories will be added at
a lower precedence than all "layers" and with no guaranteed precedence order
between them. If false no check for "layer" and "add-on" directories
will be performed.public ModuleSpec findModule(ModuleIdentifier identifier, ModuleLoader delegateLoader) throws ModuleLoadException
ModuleFinderfindModule in interface ModuleFinderidentifier - the module identifierdelegateLoader - the module loader from which dependencies should be resolvednull if no specification is found for this identifierModuleLoadExceptionpublic static ModuleSpec parseModuleXmlFile(ModuleIdentifier identifier, ModuleLoader delegateLoader, File... roots) throws IOException, ModuleLoadException
module.xml file and return the corresponding module specification.identifier - the identifier to loaddelegateLoader - the delegate module loader to use for module specificationsroots - the repository root paths to searchIOException - if reading the module file failedModuleLoadException - if creating the module specification failed (e.g. due to a parse error)Copyright © 2017 JBoss by Red Hat. All rights reserved.