public class ModuleRegister
extends java.lang.Object
implements java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>
ModuleRegister contains all found modules for the
Configurator.| Modifier and Type | Field and Description |
|---|---|
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 |
| Constructor and Description |
|---|
ModuleRegister(ModuleList finder)
Constructs and populates the
ModuleRegister. |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected final java.util.Map<java.lang.Class<? extends com.google.inject.Module>,PropertyModule> map
protected final java.util.Set<java.lang.Class<? extends com.google.inject.Module>> set
protected final ModuleList finder
protected boolean isInit
@Inject public ModuleRegister(ModuleList finder)
ModuleRegister.finder - the module finder to be usedpublic java.util.Iterator<java.lang.Class<? extends com.google.inject.Module>> iterator()
iterator in interface java.lang.Iterable<java.lang.Class<? extends com.google.inject.Module>>public int size()
HashSet.size()public PropertyModule get(java.lang.Class<? extends com.google.inject.Module> clazz)
PropertyModule of the specified class and creates a
new instance if necessary.
If the property module can not be created, null is returned.clazz - the class of the module