protected DefaultEvaluatorFactory(CollQueryTemplates templates, URLClassLoader classLoader, JavaCompiler compiler) { this.templates = templates; this.factory = new JDKEvaluatorFactory(classLoader, compiler); }
protected void compile(String source, ClassType projectionType, String[] names, Type[] types, String id, Map<String, Object> constants) throws IOException { // create source source = createSource(source, projectionType, names, types, id, constants); // compile SimpleJavaFileObject javaFileObject = new MemSourceFileObject(id, source); Writer out = new StringWriter(); CompilationTask task = compiler.getTask(out, fileManager, null, compilationOptions, null, Collections.singletonList(javaFileObject)); if (!task.call().booleanValue()) { throw new CodegenException("Compilation of " + source + " failed.\n" + out.toString()); } }
protected DefaultEvaluatorFactory(CollQueryTemplates templates, ClassLoader classLoader) { this.templates = templates; if (classLoader instanceof URLClassLoader) { this.factory = new JDKEvaluatorFactory((URLClassLoader) classLoader); } else { // for OSGi compatibility this.factory = new ECJEvaluatorFactory(classLoader); } }
protected DefaultEvaluatorFactory(CollQueryTemplates templates, URLClassLoader classLoader, JavaCompiler compiler) { this.templates = templates; this.factory = new JDKEvaluatorFactory(classLoader, compiler); }
protected DefaultEvaluatorFactory(CollQueryTemplates templates, URLClassLoader classLoader, JavaCompiler compiler) { this.templates = templates; this.factory = new JDKEvaluatorFactory(classLoader, compiler); }
protected DefaultEvaluatorFactory(CollQueryTemplates templates, ClassLoader classLoader) { this.templates = templates; if (classLoader instanceof URLClassLoader) { this.factory = new JDKEvaluatorFactory((URLClassLoader) classLoader); } else { // for OSGi compatibility this.factory = new ECJEvaluatorFactory(classLoader); } }
protected DefaultEvaluatorFactory(CollQueryTemplates templates, ClassLoader classLoader) { this.templates = templates; if (classLoader instanceof URLClassLoader) { this.factory = new JDKEvaluatorFactory((URLClassLoader) classLoader); } else { // for OSGi compatibility this.factory = new ECJEvaluatorFactory(classLoader); } }