use of org.opt4j.core.config.ModuleLoader in project opt4j by felixreimann.
the class FileOperations method load.
/**
* Loads the selected modules from the specified file.
*
* @param file
* the configuration file
*/
public void load(File file) {
setFile(file);
selectedModules.clear();
ModuleLoader loader = new ModuleLoader(moduleRegister);
Collection<? extends Module> modules = loader.load(file);
for (Module module : modules) {
PropertyModule m = new PropertyModule(module);
selectedModules.add(m);
}
System.out.println("Loaded configuration from " + file);
}
Aggregations