|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModuleRegistry
Holds instances and definitions of modules.
Nested Class Summary | |
---|---|
static class |
ModuleRegistry.Factory
Deprecated. since 4.5, use IoC ! |
Method Summary | ||
---|---|---|
ModuleDefinition |
getDefinition(String name)
|
|
List<ModuleDefinition> |
getModuleDefinitions()
Returns the list of known ModuleDefinitions, as ordered by the loading mechanism (typically in dependency order). |
|
|
getModuleInstance(Class<T> moduleClass)
Returns the module's instance. |
|
Object |
getModuleInstance(String name)
Returns the module's instance. |
|
Set<String> |
getModuleNames()
Returns the names of configured modules. |
|
ModuleVersionHandler |
getVersionHandler(String name)
|
|
boolean |
isModuleRegistered(String name)
|
|
void |
registerModuleDefinition(String name,
ModuleDefinition moduleDefinition)
|
|
void |
registerModuleInstance(String name,
Object moduleInstance)
|
|
void |
registerModuleVersionHandler(String name,
ModuleVersionHandler moduleVersionHandler)
|
Method Detail |
---|
void registerModuleDefinition(String name, ModuleDefinition moduleDefinition)
void registerModuleInstance(String name, Object moduleInstance)
void registerModuleVersionHandler(String name, ModuleVersionHandler moduleVersionHandler)
boolean isModuleRegistered(String name)
Object getModuleInstance(String name)
IllegalArgumentException
- if no such module is registered.for a type-safer method to get module instances
<T> T getModuleInstance(Class<T> moduleClass)
IllegalArgumentException
- if no such module is registered or if multiple modules are registered for this class.ModuleVersionHandler getVersionHandler(String name)
IllegalArgumentException
- if no such module is registered.ModuleDefinition getDefinition(String name)
IllegalArgumentException
- if no such module is registered.Set<String> getModuleNames()
List<ModuleDefinition> getModuleDefinitions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |