@Override protected ClassLoader initClassLoader() throws RulesInstantiationException { SimpleBundleClassLoader classLoader = new SimpleBundleClassLoader(Thread.currentThread() .getContextClassLoader()); for (Module module : modules) { try { CompiledDependency compiledDependency = getDependencyManager().loadDependency( new Dependency(DependencyType.MODULE, new IdentifierNode(null, null, module.getName(), null))); CompiledOpenClass compiledOpenClass = compiledDependency.getCompiledOpenClass(); classLoader.addClassLoader(compiledOpenClass.getClassLoader()); } catch (OpenLCompilationException e) { throw new RulesInstantiationException(e.getMessage(), e); } } return classLoader; }
@Override protected ClassLoader initClassLoader() throws RulesInstantiationException { SimpleBundleClassLoader classLoader = new SimpleBundleClassLoader(Thread.currentThread() .getContextClassLoader()); for (Module module : modules) { try { CompiledDependency compiledDependency = getDependencyManager().loadDependency( new Dependency(DependencyType.MODULE, new IdentifierNode(null, null, module.getName(), null))); CompiledOpenClass compiledOpenClass = compiledDependency.getCompiledOpenClass(); classLoader.addClassLoader(compiledOpenClass.getClassLoader()); } catch (OpenLCompilationException e) { throw new RulesInstantiationException(e.getMessage(), e); } } return classLoader; }
for (IDependency dependency : dependencies) { try { CompiledDependency loadedDependency = dependencyManager.loadDependency(dependency); OpenLBundleClassLoader currentClassLoader = (OpenLBundleClassLoader) Thread.currentThread() .getContextClassLoader();
for (IDependency dependency : dependencies) { try { CompiledDependency loadedDependency = dependencyManager.loadDependency(dependency); OpenLBundleClassLoader currentClassLoader = (OpenLBundleClassLoader) Thread.currentThread() .getContextClassLoader();
private XlsModuleSyntaxNode findXlsModuleSyntaxNode(IDependencyManager dependencyManager) { if (isSingleModuleMode()) { XlsMetaInfo xmi = (XlsMetaInfo) compiledOpenClass.getOpenClassWithErrors().getMetaInfo(); return xmi.getXlsModuleNode(); } else { try { Dependency dependency = new Dependency(DependencyType.MODULE, new IdentifierNode(null, null, moduleInfo.getName(), null)); XlsMetaInfo xmi = (XlsMetaInfo) dependencyManager.loadDependency(dependency) .getCompiledOpenClass().getOpenClassWithErrors().getMetaInfo(); return xmi == null ? null : xmi.getXlsModuleNode(); } catch (OpenLCompilationException e) { throw new OpenlNotCheckedException(e); } } }
private XlsModuleSyntaxNode findXlsModuleSyntaxNode(IDependencyManager dependencyManager) { if (isSingleModuleMode()) { XlsMetaInfo xmi = (XlsMetaInfo) compiledOpenClass.getOpenClassWithErrors().getMetaInfo(); return xmi.getXlsModuleNode(); } else { try { Dependency dependency = new Dependency(DependencyType.MODULE, new IdentifierNode(null, null, moduleInfo.getName(), null)); XlsMetaInfo xmi = (XlsMetaInfo) dependencyManager.loadDependency(dependency) .getCompiledOpenClass().getOpenClassWithErrors().getMetaInfo(); return xmi == null ? null : xmi.getXlsModuleNode(); } catch (OpenLCompilationException e) { throw new OpenlNotCheckedException(e); } } }