|
||||||||||
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
Use this to retrieve the configured singleton impl of ModuleRegistry. |
Method Summary | ||
---|---|---|
ModuleDefinition |
getDefinition(java.lang.String name)
|
|
|
getModuleInstance(java.lang.Class<T> moduleClass)
Returns the module's instance. |
|
java.lang.Object |
getModuleInstance(java.lang.String name)
Returns the module's instance. |
|
java.util.Set<java.lang.String> |
getModuleNames()
Returns the names of configured modules. |
|
ModuleVersionHandler |
getVersionHandler(java.lang.String name)
|
|
boolean |
isModuleRegistered(java.lang.String name)
|
|
void |
registerModuleDefinition(java.lang.String name,
ModuleDefinition moduleDefinition)
|
|
void |
registerModuleInstance(java.lang.String name,
java.lang.Object moduleInstance)
|
|
void |
registerModuleVersionHandler(java.lang.String name,
ModuleVersionHandler moduleVersionHandler)
|
Method Detail |
---|
void registerModuleDefinition(java.lang.String name, ModuleDefinition moduleDefinition)
void registerModuleInstance(java.lang.String name, java.lang.Object moduleInstance)
void registerModuleVersionHandler(java.lang.String name, ModuleVersionHandler moduleVersionHandler)
boolean isModuleRegistered(java.lang.String name)
java.lang.Object getModuleInstance(java.lang.String name)
java.lang.IllegalArgumentException
- if no such module is registered.for a type-safer method to get module instances
<T> T getModuleInstance(java.lang.Class<T> moduleClass)
java.lang.IllegalArgumentException
- if no such module is registered or if multiple modules are registered for this class.ModuleVersionHandler getVersionHandler(java.lang.String name)
java.lang.IllegalArgumentException
- if no such module is registered.ModuleDefinition getDefinition(java.lang.String name)
java.lang.IllegalArgumentException
- if no such module is registered.java.util.Set<java.lang.String> getModuleNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |