Iterator i = config.getPluginConfigurations().iterator();
plugins = new Vector(config.getPluginConfigurations().size());
JasenPlugin plugin = null;
ProbabilityCalculator pluginCalc = null;
PluginContainer container = null;
Properties props = null;
JasenPluginConfiguration pluginConfig = null;
while(i.hasNext()) {
pluginConfig = (JasenPluginConfiguration)i.next();
plugin = (JasenPlugin)Class.forName(pluginConfig.getType(), true, loader).newInstance();
logger.debug("Initialising plugin: " + plugin.getClass().getName());
// initialise the plugin
if(pluginConfig.getProperties() != null) {
props = new Properties();
props.load(this.getClass().getClassLoader().getResourceAsStream(pluginConfig.getProperties()));
}
else {
props = null;
}
plugin.init(props);
if(pluginConfig.getCalculator() != null) {
pluginCalc = (ProbabilityCalculator)Class.forName(pluginConfig.getCalculator(), true, loader).newInstance();
}