public class Compiler extends Object
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.| Modifier and Type | Class and Description |
|---|---|
static class |
Compiler.ThrowableComparator
This class orders Throwables allowing duplicates to be removed.
|
| Modifier and Type | Field and Description |
|---|---|
CompilerOptions |
options
This holds a reference to the compiler options.
|
static String |
version
The version of this compiler.
|
| Constructor and Description |
|---|
Compiler(CompilerOptions options,
List<String> objectNames,
Collection<File> tplFiles)
Create a compiler object with the given options and that will process the given templates (either by name or
absolute path).
|
| Modifier and Type | Method and Description |
|---|---|
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(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,
List<String> objectNames,
Collection<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.
|
public static final String version
public final CompilerOptions options
public Compiler(CompilerOptions options, List<String> objectNames, Collection<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 processpublic static CompilerResults run(CompilerOptions options, List<String> objectNames, Collection<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 processpublic static void main(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 queuesCopyright © 2014 Quattor. All Rights Reserved.