public final class ClassifyingModuleLoader extends ModuleLoader
ModuleLoader.MXBeanImpl| Modifier and Type | Field and Description |
|---|---|
private ModuleLoader |
defaultLoader |
private java.util.Map<java.lang.String,ModuleLoader> |
delegates |
private java.lang.String |
name |
NO_FINDERS| Constructor and Description |
|---|
ClassifyingModuleLoader(java.lang.String name,
java.util.Map<java.lang.String,ModuleLoader> delegates,
ModuleLoader defaultLoader)
Construct a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
protected ModuleSpec |
findModule(ModuleIdentifier moduleIdentifier)
Find a Module's specification in this ModuleLoader by its identifier.
|
protected Module |
preloadModule(ModuleIdentifier moduleIdentifier)
Preload a module based on an identifier.
|
void |
setDelegates(java.util.Map<java.lang.String,ModuleLoader> delegates)
Change the delegates map.
|
java.lang.String |
toString()
Get the string representation of this module loader.
|
addClassLoadTime, addLinkTime, findLoadedModuleLocal, forClass, forClassLoader, getDependencies, getFinders, incClassCount, incRaceCount, incScanCount, installMBeanServer, iterateModules, loadModule, loadModuleLocal, preloadExportedModule, preloadModule, refreshResourceLoaders, relink, setAndRefreshResourceLoaders, setAndRelinkDependencies, unloadModuleLocalprivate volatile java.util.Map<java.lang.String,ModuleLoader> delegates
private final ModuleLoader defaultLoader
private final java.lang.String name
public ClassifyingModuleLoader(java.lang.String name,
java.util.Map<java.lang.String,ModuleLoader> delegates,
ModuleLoader defaultLoader)
delegates - the default delegates map to usedefaultLoader - the default loader to use if no delegate mapping existsprotected Module preloadModule(ModuleIdentifier moduleIdentifier) throws ModuleLoadException
ModuleLoader.loadModuleLocal(ModuleIdentifier). A delegating module loader may delegate to the appropriate module
loader based on loader-specific criteria (via the ModuleLoader.preloadModule(ModuleIdentifier, ModuleLoader) method).preloadModule in class ModuleLoadermoduleIdentifier - the module identifiernull if the module is not foundModuleLoadException - if an error occursprotected ModuleSpec findModule(ModuleIdentifier moduleIdentifier) throws ModuleLoadException
null. If the module is found but some problem occurred (for example, a transitive dependency failed to load)
then this method should throw a ModuleLoadException of the relevant type.findModule in class ModuleLoadermoduleIdentifier - the module identifiernull if no module is found with the given identifierModuleLoadException - if any problems occur finding the modulepublic void setDelegates(java.util.Map<java.lang.String,ModuleLoader> delegates)
delegates - the new delegates map to usepublic java.lang.String toString()
ModuleLoadertoString in class ModuleLoader