|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.schmant.support.AbstractArgumentChecker
org.schmant.task.stub.AbstractTask<T>
org.schmant.task.template.process.AbstractExtProcessTask<T>
org.schmant.task.template.jdk.java.AbstractExtJvmTask<T>
org.schmant.task.template.jdk.java.AbstractExtJavaTask<T>
public abstract class AbstractExtJavaTask<T extends AbstractExtJavaTask<T>>
This is an abstract base class for tasks that run a Java program in an external process.
Constructor Summary | |
---|---|
AbstractExtJavaTask()
|
Method Summary | |
---|---|
protected void |
addArgumentsToCommandList(ArgumentList al)
Override to add decorator arguments. |
protected void |
addTaskSpecificJvmArguments(ArgumentList al)
This is a callback method that can be overridden by subclasses to add their own JVM options. |
void |
copyProperties(T spec)
Copy the properties to the target object. |
protected List<Object> |
getClasspathEntriesFromPathDecorators()
Get a list of classpath entries from the task factory's registered PathDecorator objects. |
protected List<ExtJavaTaskDecorator<?>> |
getDecorators()
|
File |
getFallbackJavaExecutable()
Get the fallback Java executable that is used if no executable is set. |
protected JavaVMType |
getJavaVMType()
|
protected Collection<?> |
getTaskSpecificClasspathEntries()
This is a callback method that can be overridden by subclasses to add their own classpath entries. |
protected Boolean |
isAssertions()
|
protected ArgumentList |
prepareArgumentList(Report r)
Prepare the command line string up to the point where the Java class to be run (or more JVM arguments) should be added. |
protected Collection<String> |
validate(Report r)
This method may be overridden by subclasses to validate their configuration (including their TaskFactory :s) before the task is
run. |
Methods inherited from class org.schmant.task.template.jdk.java.AbstractExtJvmTask |
---|
getClasspathDecorators, getClasspathEntries, getJavaExecutable, getJavaHome, getJvmOptions |
Methods inherited from class org.schmant.task.template.process.AbstractExtProcessTask |
---|
execAndWait, getArguments, getEnvironmentVariables, getProcessResult, getStderrStrategy, getStdoutStrategy, getWorkingDirectory, isFailOnErrors, isInheritEnvironmentVariables |
Methods inherited from class org.schmant.task.stub.AbstractTask |
---|
cancel, createTask, getDefaultLogFooter, getDefaultLogHeader, getDependencyForTasksScheduledByThisTask, getDependencyObservable, getFailureCause, getLogFooter, getLogHeader, getSatisfiedStateLock, getThis, isCancelled, isDone, isInterrupted, isRunning, isSatisfied, isSuccessful, run, runInternal, setLogFooter, setLogHeader, setReportLevel, setTraceLogging, toString |
Methods inherited from class org.schmant.support.AbstractArgumentChecker |
---|
check, check, check, check |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.schmant.task.Task |
---|
cancel, getDependencyForTasksScheduledByThisTask, getFailureCause, isCancelled, isDone, isInterrupted, isRunning, isSuccessful |
Methods inherited from interface org.schmant.run.TaskDependency |
---|
getDependencyObservable, getSatisfiedStateLock, isSatisfied |
Methods inherited from interface org.schmant.task.TaskRunnable |
---|
run |
Constructor Detail |
---|
public AbstractExtJavaTask()
Method Detail |
---|
protected final Boolean isAssertions()
protected final JavaVMType getJavaVMType()
protected final List<ExtJavaTaskDecorator<?>> getDecorators()
public File getFallbackJavaExecutable()
javaHome
property is set and try to get the
java[.exe]
executable from that. If it is not set, search the
directories referenced by the JAVA_HOME
or PATH
environment variables are searched (in that order), and the first java[.exe]
executable found is returned.
InvalidTaskConfigurationException
- If no Java executable is set
and none can be found.protected Collection<?> getTaskSpecificClasspathEntries()
The default implementation is empty.
protected void addTaskSpecificJvmArguments(ArgumentList al)
al
- The command line to add options to.protected List<Object> getClasspathEntriesFromPathDecorators()
PathDecorator
objects.
null
.protected ArgumentList prepareArgumentList(Report r)
protected void addArgumentsToCommandList(ArgumentList al)
addArgumentsToCommandList
in class AbstractExtProcessTask<T extends AbstractExtJavaTask<T>>
al
- The list of program arguments. Modified by this call.protected Collection<String> validate(Report r)
AbstractTask
TaskFactory
:s) before the task is
run.
Validation errors are collected as strings. If this method is overridden,
always call super.validate
.
validate
in class AbstractTask<T extends AbstractExtJavaTask<T>>
r
- A report to log warning and debug messages to. Validation errors
should not be logged, though. They are logged later.
public void copyProperties(T spec)
AbstractTask
Subclasses must override this to copy their properties. The
overriding method must call super.copyProperties
.
copyProperties
in interface TaskSpecification<T extends AbstractExtJavaTask<T>>
copyProperties
in class AbstractExtJvmTask<T extends AbstractExtJavaTask<T>>
spec
- The specification to copy properties to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |