Package wyvern.tools.parsing.parselang.java

Examples of wyvern.tools.parsing.parselang.java.StringFileObject


    }
    System.out.println(dump.toString());

    JavaCompiler jc = javax.tools.ToolProvider.getSystemJavaCompiler();

    List<StringFileObject> compilationUnits = Arrays.asList(new StringFileObject(javaClassName, target.toString()));
    StoringClassLoader loader = new StoringClassLoader(this.getClass().getClassLoader());
    StoringFileManager sfm = new StoringFileManager(jc.getStandardFileManager(null, null, null),
        loader);

    StringFileObject sfo = new StringFileObject(javaClassName, target.toString());
    sfm.putFileForInput(StandardLocation.SOURCE_PATH, "", javaClassName, sfo);
    JavaCompiler.CompilationTask ct = jc.getTask(null, sfm, null, null, null, Arrays.asList(sfo));

    if (!ct.call())
      throw new RuntimeException();
View Full Code Here

TOP

Related Classes of wyvern.tools.parsing.parselang.java.StringFileObject

Copyright © 2018 www.massapicom. 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.