public WGHierarchicalDatabaseListener createListenerInstance(String classOrModuleName) throws Throwable {
if (classOrModuleName != null) {
// try to find java class
try {
Class listenerClass = Class.forName(classOrModuleName);
WGHierarchicalDatabaseListener listenerImpl = (WGHierarchicalDatabaseListener) listenerClass.newInstance();
return listenerImpl;
}
catch (ClassNotFoundException e) {
return new TMLScriptHDBListener(_core, classOrModuleName);
}