Interface ModuleWrapper
- All Superinterfaces:
InjectionLayerHolder<dev.derklaro.aerogel.Injector>
The module wrapper represents a loaded module. The wrapper holds the configuration and other runtime information
about the module like the module lifecycle. The wrapper is also responsible for changing the module lifecycle of a
module.
- Since:
- 4.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionGet the class loader which is responsible for this module.Get the data directory of this module in which the module should store its configuration files.Get all modules this module is depending on.@NonNull InjectionLayer<dev.derklaro.aerogel.Injector> Get the injection layer which was used while creating this module instance and is used to inject module tasks.Changes the lifecycle of this module toModuleLifeCycle.LOADEDif possible and fires all associated tasks.module()Get the wrapped module instance of this wrapper.Get the module configuration on which base the module was created.Get the current lifecycle of this wrapper.Get the module provider which loaded this module.Get all module tasks which were detected in the main class of the module.Changes the lifecycle of this module toModuleLifeCycle.RELOADINGif possible and fires all associated tasks.Changes the lifecycle of this module toModuleLifeCycle.STARTEDif possible and fires all associated tasks.Changes the lifecycle of this module toModuleLifeCycle.STOPPEDif possible and fires all associated tasks.Changes the lifecycle of this module toModuleLifeCycle.UNLOADEDif possible and fires all associated tasks.uri()Get the uri from where the module was loaded.url()Get the url from where the module was loaded.
-
Method Details
-
moduleTasks
Get all module tasks which were detected in the main class of the module.- Returns:
- an immutable map of all module tasks which were detected in the main class of the module.
-
dependingModules
Get all modules this module is depending on.- Returns:
- an immutable set of all modules this module is depending on.
-
module
-
moduleLifeCycle
Get the current lifecycle of this wrapper.- Returns:
- the current lifecycle of this wrapper.
-
moduleProvider
Get the module provider which loaded this module.- Returns:
- the module provider which loaded this module.
-
moduleConfiguration
Get the module configuration on which base the module was created.- Returns:
- the module configuration on which base the module was created.
-
classLoader
Get the class loader which is responsible for this module.- Returns:
- the class loader which is responsible for this module.
-
loadModule
Changes the lifecycle of this module toModuleLifeCycle.LOADEDif possible and fires all associated tasks.- Returns:
- the same instance of this class, for chaining.
- See Also:
-
startModule
Changes the lifecycle of this module toModuleLifeCycle.STARTEDif possible and fires all associated tasks.- Returns:
- the same instance of this class, for chaining.
- See Also:
-
reloadModule
Changes the lifecycle of this module toModuleLifeCycle.RELOADINGif possible and fires all associated tasks.- Returns:
- the same instance of this class, for chaining.
- See Also:
-
stopModule
Changes the lifecycle of this module toModuleLifeCycle.STOPPEDif possible and fires all associated tasks.- Returns:
- the same instance of this class, for chaining.
- See Also:
-
unloadModule
Changes the lifecycle of this module toModuleLifeCycle.UNLOADEDif possible and fires all associated tasks. The module will be unregistered from the provider, the class loader will be closed and the state of this module changes toModuleLifeCycle.UNUSABLE.- Returns:
- the same instance of this class, for chaining.
- See Also:
-
dataDirectory
-
url
-
uri
-
injectionLayer
Get the injection layer which was used while creating this module instance and is used to inject module tasks.- Specified by:
injectionLayerin interfaceInjectionLayerHolder<dev.derklaro.aerogel.Injector>- Returns:
- the injection layer of the module.
-