java.lang.AutoCloseable, IterableModuleFinder, ModuleFinderpublic final class LocalModuleFinder extends java.lang.Object implements IterableModuleFinder, java.lang.AutoCloseable
module.xml descriptors.| Constructor | 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(java.io.File[] repoRoots) | 
 Construct a new instance. 
 | 
LocalModuleFinder(java.io.File[] repoRoots,
                 PathFilter pathFilter) | 
 Construct a new instance. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
void | 
close() | 
 Close this module loader and release all backing files. 
 | 
ModuleSpec | 
findModule(java.lang.String name,
          ModuleLoader delegateLoader) | 
 Find a module specification for the given name. 
 | 
java.util.Iterator<java.lang.String> | 
iterateModules(java.lang.String baseName,
              boolean recursive) | 
 Iterate the modules which can be located via this module finder. 
 | 
static ModuleSpec | 
parseModuleXmlFile(java.lang.String name,
                  ModuleLoader delegateLoader,
                  java.io.File... roots) | 
 Parse a  
module.xml file and return the corresponding module specification. | 
static ModuleSpec | 
parseModuleXmlFile(ModuleIdentifier identifier,
                  ModuleLoader delegateLoader,
                  java.io.File... roots) | 
 Deprecated. 
 
Use  
parseModuleXmlFile(String, ModuleLoader, File...) instead. | 
java.lang.String | 
toString() | 
iterateModulesfindModulepublic LocalModuleFinder(java.io.File[] repoRoots,
                         PathFilter pathFilter)
repoRoots - the repository roots to usepathFilter - the path filter to usepublic LocalModuleFinder(java.io.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(java.lang.String name, ModuleLoader delegateLoader) throws ModuleLoadException
ModuleFinderModuleFinder.findModule(ModuleIdentifier, ModuleLoader) method.findModule in interface ModuleFindername - the module namedelegateLoader - the module loader from which dependencies should be resolvednull if no specification is found for this identifierModuleLoadException@Deprecated public static ModuleSpec parseModuleXmlFile(ModuleIdentifier identifier, ModuleLoader delegateLoader, java.io.File... roots) throws java.io.IOException, ModuleLoadException
parseModuleXmlFile(String, ModuleLoader, File...) instead.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 searchjava.io.IOException - if reading the module file failedModuleLoadException - if creating the module specification failed (e.g. due to a parse error)public static ModuleSpec parseModuleXmlFile(java.lang.String name, ModuleLoader delegateLoader, java.io.File... roots) throws java.io.IOException, ModuleLoadException
module.xml file and return the corresponding module specification.name - the name of the module to loaddelegateLoader - the delegate module loader to use for module specificationsroots - the repository root paths to searchjava.io.IOException - if reading the module file failedModuleLoadException - if creating the module specification failed (e.g. due to a parse error)public java.util.Iterator<java.lang.String> iterateModules(java.lang.String baseName,
                                                           boolean recursive)
IterableModuleFinderiterateModules in interface IterableModuleFinderbaseName - the identifier to start with, or null to iterate all modules; ignored if this module
 loader does not have a concept of nested modulesrecursive - true to find recursively nested modules, false to only find immediately nested
 modules; ignored if this module finder does not have a concept of nested modulespublic java.lang.String toString()
toString in class java.lang.Objectpublic void close()
close in interface java.lang.AutoCloseableCopyright © 2022 JBoss by Red Hat. All rights reserved.