|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.quattor.pan.Compiler
public class Compiler
Primary java interface for invoking the pan compiler. All external methods of
running the compiler (ant tasks, scripts, etc.) should make use of an
instance of this class.
Instances of this class are thread-safe (the underlying implementation uses
threads in the compilation and build of machine templates). However, the
process method should only be invoked only by a single thread;
the method is synchronized to ensure this. The submit method
should be called only by tasks created internally by the compiler.
| Nested Class Summary | |
|---|---|
static class |
Compiler.ThrowableComparator
This class orders Throwables allowing duplicates to be removed. |
| Field Summary | |
|---|---|
CompilerOptions |
options
This holds a reference to the compiler options. |
static java.lang.String |
version
The version of this compiler. |
| Constructor Summary | |
|---|---|
Compiler(CompilerOptions options,
java.util.List<java.lang.String> objectNames,
java.util.Collection<java.io.File> tplFiles)
Create a compiler object with the given options and that will process the given templates (either by name or absolute path). |
|
| Method Summary | |
|---|---|
void |
ensureMinimumBuildThreadLimit(int minLimit)
Ensures that the number of threads in the build pool is at least as large as the number given. |
BuildCache |
getBuildCache()
Returns a reference to objects (machine profiles) which have already been built. |
CompileCache |
getCompileCache()
Returns a reference to the compile cache used to store compiled templates. |
SourceRepository |
getSourceRepository()
|
Valid1Cache |
getValid1Cache()
|
Valid2Cache |
getValid2Cache()
|
static void |
main(java.lang.String[] args)
Extracts the version of the compiler and prints the value on the standard output. |
CompilerResults |
process()
Process the templates referenced by the CompilerOptions object used to initialize this instance. |
static CompilerResults |
run(CompilerOptions options,
java.util.List<java.lang.String> objectNames,
java.util.Collection<java.io.File> tplFiles)
This is a convenience method which creates a compiler and then invokes the process method. |
void |
submit(Task<? extends TaskResult> task)
Submits a task to one of the compiler's task queues for processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String version
public final CompilerOptions options
| Constructor Detail |
|---|
public Compiler(CompilerOptions options,
java.util.List<java.lang.String> objectNames,
java.util.Collection<java.io.File> tplFiles)
options - compiler options to use for the created compilerobjectNames - template names to compile/build; these will be looked-up on
the load pathtplFiles - absolute file names of templates to process| Method Detail |
|---|
public static CompilerResults run(CompilerOptions options,
java.util.List<java.lang.String> objectNames,
java.util.Collection<java.io.File> tplFiles)
process method.
options - compiler options to use for the created compilerobjectNames - object template names to compile/build; these will be
looked-up on the load pathtplFiles - absolute file names of templates to process
public static void main(java.lang.String[] args)
args - all arguments are ignoredpublic void ensureMinimumBuildThreadLimit(int minLimit)
minLimit - minimum build queue limitpublic CompilerResults process()
public CompileCache getCompileCache()
public BuildCache getBuildCache()
public Valid1Cache getValid1Cache()
public Valid2Cache getValid2Cache()
public SourceRepository getSourceRepository()
public void submit(Task<? extends TaskResult> task)
task - task to run on one of the compiler's task queues
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||