compile.glue
Glues instrumental.compile to instrumental.archive, compile to JAR entirely in-memory
- Provides a CompilationTarget from instrumental.compile for instrumental.archive
- The output can loaded using instrumental.lade
Examples
Compile to a new Archive (a single compiler output to new archive)compiler.versionAt(RELEASE_8) .source(from( "package com.acme; \n" + "public class FooBar { \n" + " private String field; \n" + " public String get() \n" + " { \n" + " return field; \n" + " } \n" + " public void set(String field) \n" + " { \n" + " this.field = field; \n" + " } \n" + "} \n") ) .compile(toArchive())
Add compiler to existing Archive (multiple compilers output to existing archive)
Archive.archive() .sourcing(contentCompiledFrom( compiler.versionAt(RELEASE_8) .source(from( "package com.acme; \n" + "public class FooBar { \n" + " private String field; \n" + " public String get() \n" + " { \n" + " return field; \n" + " } \n" + " public void set(String field) \n" + " { \n" + " this.field = field; \n" + " } \n" + "} \n")) ))