private FrontendModule newModuleInstantiation(ModuleHandle handle, boolean addPhantom) { try { int type = handle.getModuleType(); FrontendModule module = instantiateModule(handle); switch (type) { case ModuleHandle.TYPE_PROC: { recOut.getModuleControlData(handle); recOut.getModuleListeningList(handle); break; } case ModuleHandle.TYPE_ANLZ: { recOut.getAnalysisParameters(handle); break; } } return module; } catch (InstantiationException ie) { ie.printStackTrace(); } catch (IllegalAccessException iae) { iae.printStackTrace(); } catch (InvocationTargetException ite) { ite.printStackTrace(); } catch (ClassNotFoundException cnfe) { if (addPhantom) { logger.error("Loading module: JAR does not contain module " + handle.getModuleName()); addPhantomModule(handle); } } catch (NoModuleJarException nmj) { logger.error(nmj.getMessage()); addPhantomModule(handle); } return null; }