Package org.opt4j.config
Class ModuleRegister
java.lang.Object
org.opt4j.config.ModuleRegister
public class ModuleRegister
extends Object
implements Iterable<Class<? extends com.google.inject.Module>>
The
ModuleRegister contains all found modules for the
Configurator.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ModuleListprotected booleanprotected final Map<Class<? extends com.google.inject.Module>,PropertyModule> -
Constructor Summary
ConstructorsConstructorDescriptionModuleRegister(ModuleList finder) Constructs and populates theModuleRegister. -
Method Summary
Modifier and TypeMethodDescriptionReturns thePropertyModuleof the specified class and creates a new instance if necessary.iterator()intsize()Returns the number of found modules.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
map
-
set
-
finder
-
isInit
protected boolean isInit
-
-
Constructor Details
-
ModuleRegister
Constructs and populates theModuleRegister.- Parameters:
finder- the module finder to be used
-
-
Method Details
-
iterator
-
size
public int size()Returns the number of found modules.- Returns:
- the number of found modules
- See Also:
-
get
Returns thePropertyModuleof the specified class and creates a new instance if necessary.- Parameters:
clazz- the class of the module- Returns:
- the property module
-