use of com.qcadoo.plugin.api.Module in project qcadoo by qcadoo.
the class CustomModuleFactory method parseElement.
@Override
protected Module parseElement(final String pluginIdentifier, final Element element) {
String className = getRequiredAttribute(element, "class");
Class<?> clazz = null;
try {
clazz = Thread.currentThread().getContextClassLoader().loadClass(className);
} catch (ClassNotFoundException e) {
throw new IllegalStateException("Missing class " + className + " of " + getIdentifier() + " module", e);
}
Module module = (Module) applicationContext.getBean(clazz);
checkNotNull(className, "Missing bean " + className + " of " + getIdentifier() + " module");
return module;
}
Aggregations