|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimple.page.compile.Compiler
public class Compiler
The Compiler
object is used to compile a translated
source. This is provided the source specification for the page,
which contains the class name, the runtime language, and location.
This should be subclassed to support a specific language, the
current languages supported are Java and Groovy.
GroovyCompiler
,
JavaCompiler
Field Summary | |
---|---|
protected simple.page.compile.CompilerFactory |
factory
This is used to create a compiler for the specified source. |
protected simple.page.compile.CompilerLoader |
loader
This is used to load the class files from the workspace. |
protected java.io.File |
root
This is the build directory for the provided workspace. |
Constructor Summary | |
---|---|
Compiler(Workspace project)
Constructor for the Compiler object. |
Method Summary | |
---|---|
java.lang.Class |
compile(Source source)
This will compile an load the specified source specificaiton. |
java.lang.Class |
compile(Source source,
Path path)
This will compile an load the specified source specificaiton. |
java.lang.Class |
load(Source source)
This is used to load the compiled class from the project build directory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected simple.page.compile.CompilerFactory factory
protected simple.page.compile.CompilerLoader loader
protected java.io.File root
Constructor Detail |
---|
public Compiler(Workspace project) throws java.io.IOException
Compiler
object. This is used
to create a compiler that compiles classes into the workspace
build directory. This will delegate the compilation process to
a subclass implementation, which can handle a specific language.
project
- this is the project that defines the layout
java.io.IOException
Method Detail |
---|
public java.lang.Class load(Source source) throws java.lang.Exception
source
- this contains the details need to load the class
java.lang.Exception
public java.lang.Class compile(Source source) throws java.lang.Exception
Source
object must contain the class
name, the source location and the runtime language to be used.
This method will delegate the compilation procedure to a class
that implements this method for a specific language type.
source
- this contains the details for the source file
java.lang.Exception
public java.lang.Class compile(Source source, Path path) throws java.lang.Exception
Source
object must contain the class
name, the source location and the runtime language to be used.
This method will delegate the compilation procedure to a class
that implements this method for a specific language type.
source
- this contains the details for the source filepath
- this is the full classpath for the compiler
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |