use of org.libj.jci.InMemoryCompiler in project jaxdb by jaxdb.
the class JSqlTest method createEntities.
static void createEntities(final String name) throws CompilationException, GeneratorExecutionException, IOException, SAXException, TransformerException {
final URL url = assertNotNull(ClassLoader.getSystemClassLoader().getResource(name + ".ddlx"));
final File destDir = new File("target/generated-test-sources/jaxdb");
Generator.generate(url, name, destDir);
final InMemoryCompiler compiler = new InMemoryCompiler();
Files.walk(destDir.toPath()).filter(p -> p.getFileName().toString().endsWith(".java")).forEach(rethrow((Path p) -> compiler.addSource(new String(Files.readAllBytes(p)))));
compiler.compile(destDir, "-g");
}
Aggregations