public class CompileWorker extends Object implements Runnable
Modifier and Type | Class and Description |
---|---|
private static class |
CompileWorker.CompilationJob
a compilation job
|
Modifier and Type | Field and Description |
---|---|
private Thread |
compilationThread
We spawn a thread to perform compilation.
|
private ArrayList |
compilerArgumentsList |
private net.n3.nanoxml.XMLElement |
compilerArgumentsSpec |
private String |
compilerArgumentsToUse |
private ArrayList |
compilerList |
private net.n3.nanoxml.XMLElement |
compilerSpec |
private String |
compilerToUse |
private CompileHandler |
handler |
private AutomatedInstallData |
idata |
private ArrayList |
jobs
Compilation jobs
|
private CompileResult |
result |
private net.n3.nanoxml.XMLElement |
spec |
private static String |
SPEC_RESOURCE_NAME
Name of resource for specifying compilation parameters.
|
private VariableSubstitutor |
vs |
Constructor and Description |
---|
CompileWorker(AutomatedInstallData idata,
CompileHandler handler)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
private void |
changeClassPath(ArrayList classpath,
net.n3.nanoxml.XMLElement child)
helper: process a
<classpath> tag. |
private boolean |
collectJobs()
Parse the compilation specification file and create jobs.
|
private CompileWorker.CompilationJob |
collectJobsRecursive(net.n3.nanoxml.XMLElement node,
ArrayList classpath) |
private CompileResult |
compileJobs()
perform the actual compilation
|
ArrayList |
getAvailableArguments()
Return list of compiler arguments to choose from.
|
ArrayList |
getAvailableCompilers()
Return list of compilers to choose from.
|
String |
getCompiler()
Get the compiler used.
|
String |
getCompilerArguments()
Get the compiler arguments used.
|
CompileResult |
getResult()
Get the result of the compilation.
|
private void |
readChoices(net.n3.nanoxml.XMLElement element,
ArrayList result) |
private boolean |
readSpec() |
void |
run()
This is called when the compilation thread is activated.
|
private ArrayList |
scanDirectory(File path)
helper: recursively scan given directory.
|
void |
setCompiler(String compiler)
Set the compiler to use.
|
void |
setCompilerArguments(String arguments)
Set the compiler arguments to use.
|
void |
startThread()
Start the compilation in a separate thread.
|
private static final String SPEC_RESOURCE_NAME
private VariableSubstitutor vs
private Thread compilationThread
private net.n3.nanoxml.XMLElement spec
private AutomatedInstallData idata
private CompileHandler handler
private net.n3.nanoxml.XMLElement compilerSpec
private ArrayList compilerList
private String compilerToUse
private net.n3.nanoxml.XMLElement compilerArgumentsSpec
private ArrayList compilerArgumentsList
private String compilerArgumentsToUse
private CompileResult result
public CompileWorker(AutomatedInstallData idata, CompileHandler handler) throws IOException
idata
- The installation data.handler
- The handler to notify of progress.IOException
public ArrayList getAvailableCompilers()
public void setCompiler(String compiler)
compiler
- compiler to use (not checked)public String getCompiler()
public ArrayList getAvailableArguments()
public void setCompilerArguments(String arguments)
public String getCompilerArguments()
public CompileResult getResult()
public void startThread()
public void run()
private boolean readSpec()
private void readChoices(net.n3.nanoxml.XMLElement element, ArrayList result)
private boolean collectJobs() throws Exception
Exception
private CompileResult compileJobs()
private CompileWorker.CompilationJob collectJobsRecursive(net.n3.nanoxml.XMLElement node, ArrayList classpath) throws Exception
Exception
private void changeClassPath(ArrayList classpath, net.n3.nanoxml.XMLElement child) throws Exception
<classpath>
tag.Exception
private ArrayList scanDirectory(File path)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses