|JL Code Generation|
|Java Layers Home||
Java Layers is implemented as a source-to-source compiler in which JL code is compiled into pure Java code. Once the Java source code has been generated, the JL compiler (jlc) invokes a standard Java compiler by calling "javac." We now describe how this compilation process can be customized by jlc users.
The jlc compiler provides an invocation protocol and a number of compiler options to allow users to control how generated Java source files are processed. The invocation protocol specifies that after jlc has generated all the Java sources files for a JL source file, jlc will spawn a new process to invoke the Java compiler. The invocation string passed to the new process is made up of several constituent parts, which are listed in order below:
The name of the Java compiler defaults to "javac," but this can be overridden using jlc's JavacName() parameter to specify any user-chosen path name.
The -KeepJava parameter instructs jlc not to erase the generated Java source files, as it does by default after invoking the Java compiler.
The -NoJavaComp parameter instructs jlc not to invoke the Java compiler after generating Java source code.
The -JavaCompAll parameter instructs jlc to include all generated source files on the command line when javac is invoked. The Sun SDK 1.3.1 compiler needs to be invoked with all participating source files to correctly compile the Sibling pattern, as described in the JL .30 Release Notes. JL normally invokes javac listing only the root of the generated source dependence tree, which helps avoid overrunning the command line buffer.
The complete list of jlc options can be viewed by invoking jlc with no parameters.
Last Modified: 09/05/2001 02:15 PM