use of henplus.Command in project henplus by neurolabs.
the class PluginCommand method loadPlugin.
/**
* load a plugin and register it at HenPlus.
*/
private Command loadPlugin(final String className) throws ClassNotFoundException, ClassCastException, InstantiationException, IllegalAccessException {
Command plugin = null;
final Class<?> pluginClass = Class.forName(className);
plugin = (Command) pluginClass.newInstance();
_henplus.getDispatcher().register(plugin);
return plugin;
}
Aggregations