|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.izforge.izpack.installer.CompileWorker
public class CompileWorker
This class does alle the work for compiling sources.
It responsible for
| Nested Class Summary | |
|---|---|
private static class |
CompileWorker.CompilationJob
a compilation job |
private static class |
CompileWorker.EclipseStdErrHandler
This PrintStream is used to track the Eclipse compiler error output. |
private static class |
CompileWorker.EclipseStdOutHandler
This PrintStream is used to track the Eclipse compiler output. |
private static class |
CompileWorker.StdErrParser
|
private static class |
CompileWorker.StdOutParser
|
private static class |
CompileWorker.StreamParser
Common class for parsing Eclipse compiler output. |
| Field Summary | |
|---|---|
private java.util.ArrayList<java.lang.String> |
compilerArgumentsList
|
private IXMLElement |
compilerArgumentsSpec
|
private java.lang.String |
compilerArgumentsToUse
|
private java.util.ArrayList<java.lang.String> |
compilerList
|
private IXMLElement |
compilerSpec
|
private java.lang.String |
compilerToUse
|
private static java.lang.String |
ECLIPSE_COMPILER_CLASS
|
private static java.lang.String |
ECLIPSE_COMPILER_NAME
|
private CompileHandler |
handler
|
private AutomatedInstallData |
idata
|
private java.util.ArrayList<CompileWorker.CompilationJob> |
jobs
Compilation jobs |
private CompileResult |
result
|
private IXMLElement |
spec
|
private static java.lang.String |
SPEC_RESOURCE_NAME
Name of resource for specifying compilation parameters. |
private VariableSubstitutor |
vs
|
| Constructor Summary | |
|---|---|
CompileWorker(AutomatedInstallData idata,
CompileHandler handler)
The constructor. |
|
| Method Summary | |
|---|---|
private void |
changeClassPath(java.util.ArrayList classpath,
IXMLElement child)
helper: process a <classpath> tag. |
private boolean |
collectJobs()
Parse the compilation specification file and create jobs. |
private CompileWorker.CompilationJob |
collectJobsRecursive(IXMLElement node,
java.util.ArrayList classpath)
|
private CompileResult |
compileJobs()
perform the actual compilation |
java.util.ArrayList<java.lang.String> |
getAvailableArguments()
Return list of compiler arguments to choose from. |
java.util.ArrayList<java.lang.String> |
getAvailableCompilers()
Return list of compilers to choose from. |
java.lang.String |
getCompiler()
Get the compiler used. |
java.lang.String |
getCompilerArguments()
Get the compiler arguments used. |
CompileResult |
getResult()
Get the result of the compilation. |
private void |
readChoices(IXMLElement element,
java.util.ArrayList<java.lang.String> choiceList)
|
private boolean |
readSpec()
|
void |
run()
This is called when the compilation thread is activated. |
private java.util.ArrayList<java.io.File> |
scanDirectory(java.io.File path)
helper: recursively scan given directory. |
void |
setCompiler(java.lang.String compiler)
Set the compiler to use. |
void |
setCompilerArguments(java.lang.String arguments)
Set the compiler arguments to use. |
void |
startThread()
Start the compilation in a separate thread. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.util.ArrayList<CompileWorker.CompilationJob> jobs
private static final java.lang.String SPEC_RESOURCE_NAME
private static final java.lang.String ECLIPSE_COMPILER_NAME
private static final java.lang.String ECLIPSE_COMPILER_CLASS
private VariableSubstitutor vs
private IXMLElement spec
private AutomatedInstallData idata
private CompileHandler handler
private IXMLElement compilerSpec
private java.util.ArrayList<java.lang.String> compilerList
private java.lang.String compilerToUse
private IXMLElement compilerArgumentsSpec
private java.util.ArrayList<java.lang.String> compilerArgumentsList
private java.lang.String compilerArgumentsToUse
private CompileResult result
| Constructor Detail |
|---|
public CompileWorker(AutomatedInstallData idata,
CompileHandler handler)
throws java.io.IOException
idata - The installation data.handler - The handler to notify of progress.
java.io.IOException| Method Detail |
|---|
public java.util.ArrayList<java.lang.String> getAvailableCompilers()
public void setCompiler(java.lang.String compiler)
compiler - compiler to use (not checked)public java.lang.String getCompiler()
public java.util.ArrayList<java.lang.String> getAvailableArguments()
public void setCompilerArguments(java.lang.String arguments)
arguments - The argument to use.public java.lang.String getCompilerArguments()
public CompileResult getResult()
public void startThread()
public void run()
run in interface java.lang.Runnableprivate boolean readSpec()
private void readChoices(IXMLElement element,
java.util.ArrayList<java.lang.String> choiceList)
private boolean collectJobs()
throws java.lang.Exception
java.lang.Exceptionprivate CompileResult compileJobs()
private CompileWorker.CompilationJob collectJobsRecursive(IXMLElement node,
java.util.ArrayList classpath)
throws java.lang.Exception
java.lang.Exception
private void changeClassPath(java.util.ArrayList classpath,
IXMLElement child)
throws java.lang.Exception
<classpath> tag.
java.lang.Exceptionprivate java.util.ArrayList<java.io.File> scanDirectory(java.io.File path)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||