org.opt4j.core.config
Class ModuleRegister
java.lang.Object
org.opt4j.core.config.ModuleRegister
- All Implemented Interfaces:
- java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>
public class ModuleRegister
- extends java.lang.Object
- implements java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>
The ModuleRegister contains all found modules for the
Configurator.
|
Field Summary |
protected ModuleList |
finder
|
protected boolean |
isInit
|
protected java.util.Map<java.lang.Class<? extends com.google.inject.Module>,PropertyModule> |
map
|
protected java.util.Set<java.lang.Class<? extends com.google.inject.Module>> |
set
|
|
Method Summary |
PropertyModule |
get(java.lang.Class<? extends com.google.inject.Module> clazz)
Returns the PropertyModule of the specified class and creates a
new instance if necessary. |
java.util.Iterator<java.lang.Class<? extends com.google.inject.Module>> |
iterator()
|
int |
size()
Returns the number of found modules. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
map
protected final java.util.Map<java.lang.Class<? extends com.google.inject.Module>,PropertyModule> map
set
protected final java.util.Set<java.lang.Class<? extends com.google.inject.Module>> set
finder
protected final ModuleList finder
isInit
protected boolean isInit
ModuleRegister
@Inject
public ModuleRegister(ModuleList finder)
- Constructs and populates the
ModuleRegister.
- Parameters:
finder - the module finder to be used
iterator
public java.util.Iterator<java.lang.Class<? extends com.google.inject.Module>> iterator()
- Specified by:
iterator in interface java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>
size
public int size()
- Returns the number of found modules.
- Returns:
- the number of found modules
- See Also:
HashSet.size()
get
public PropertyModule get(java.lang.Class<? extends com.google.inject.Module> clazz)
- Returns the
PropertyModule of the specified class and creates a
new instance if necessary.
If the property module can not be created, null is returned.
- Parameters:
clazz - the class of the module
- Returns:
- the property module or null