Examples of JavaCompilation


Examples of ch.uzh.ifi.seal.changedistiller.ast.java.JavaCompilation

    public static JavaCompilation compileFile(String filename) {
        CompilerOptions options = getDefaultCompilerOptions();
        Parser parser = createCommentRecorderParser(options);
        ICompilationUnit cu = createCompilationunit(getContentOfFile(TEST_DATA_BASE_DIR + filename), filename);
        CompilationResult compilationResult = createDefaultCompilationResult(cu, options);
        return new JavaCompilation(parser.parse(cu, compilationResult), parser.scanner);
    }
View Full Code Here

Examples of org.rascalmpl.interpreter.staticErrors.JavaCompilation

      JavaCompiler<T> javaCompiler = new JavaCompiler<T>(parent.getClassLoader(), fileManagerCache.get(parent), commandline);
      Class<T> result = javaCompiler.compile(className, source, null, Object.class);
      fileManagerCache.put(result, javaCompiler.getFileManager());
      return result;
    } catch (ClassCastException e) {
      throw new JavaCompilation(e.getMessage(), vf.sourceLocation(loc));
    } catch (JavaCompilerException e) {
      throw new JavaCompilation("with classpath [" + config.getRascalJavaClassPathProperty() + "]: " + e.getDiagnostics().getDiagnostics().iterator().next().getMessage(null), vf.sourceLocation(loc));
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.