Package org.opt4j.config
Class ModuleLoader
- java.lang.Object
-
- org.opt4j.config.ModuleLoader
-
public class ModuleLoader extends Object
Helper class for loadingPropertyModule
configurations from files or retrieving these from XMLNode
s.
-
-
Field Summary
Fields Modifier and Type Field Description protected ModuleRegister
moduleRegister
-
Constructor Summary
Constructors Constructor Description ModuleLoader(ModuleRegister moduleRegister)
Constructs aModuleLoader
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<? extends com.google.inject.Module>
get(Node node)
Loads all modules from an XMLNode
.Collection<? extends com.google.inject.Module>
load(File file)
Loads all modules from aFile
.Collection<? extends com.google.inject.Module>
load(String filename)
Loads all modules from a file (as filename).
-
-
-
Field Detail
-
moduleRegister
protected final ModuleRegister moduleRegister
-
-
Constructor Detail
-
ModuleLoader
public ModuleLoader(ModuleRegister moduleRegister)
Constructs aModuleLoader
.- Parameters:
moduleRegister
- the register of all found modules
-
-
Method Detail
-
load
public Collection<? extends com.google.inject.Module> load(String filename)
Loads all modules from a file (as filename).- Parameters:
filename
- the file (as filename)- Returns:
- the modules
-
load
public Collection<? extends com.google.inject.Module> load(File file)
Loads all modules from aFile
.- Parameters:
file
- the input file- Returns:
- a list of the modules
-
get
public Collection<? extends com.google.inject.Module> get(Node node)
Loads all modules from an XMLNode
.- Parameters:
node
- the XML node- Returns:
- a list of the modules
-
-