org.schmant.task.template.jdk.java
Class AbstractExtJvmTaskFactory<T extends AbstractExtJvmTaskFactory<T,U>,U extends AbstractExtJvmTask<U>>

java.lang.Object
  extended by org.schmant.task.stub.AbstractTaskFactory<T,U>
      extended by org.schmant.task.template.process.AbstractExtProcessTaskFactory<T,U>
          extended by org.schmant.task.template.jdk.java.AbstractExtJvmTaskFactory<T,U>
All Implemented Interfaces:
ArgumentsConfigurable<T>, ClasspathConfigurable<T>, LoggingConfigurable<T>, TaskFactory<T,U>, TaskRunnable, ExtJvmConfigurable<T>, ExtJvmTaskConfigurable<T>, JvmConfigurable<T>, JvmOptionsConfigurable<T>, JavaHomeConfigurable<T>, ExtProcessConfigurable<T>
Direct Known Subclasses:
AbstractExtJavaTaskFactory, ExtFindbugsTF

public abstract class AbstractExtJvmTaskFactory<T extends AbstractExtJvmTaskFactory<T,U>,U extends AbstractExtJvmTask<U>>
extends AbstractExtProcessTaskFactory<T,U>
implements ExtJvmTaskConfigurable<T>

Abstract base class for AbstractExtJvmTask factory implementations.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
AbstractExtJvmTaskFactory()
           
 
Method Summary
 T addClasspathDecorator(PathDecorator<?,?> cd)
          Add one path decorator.
 T addClasspathDecorators(Object o)
          Add one or several path decorators.
 T addClasspathEntries(Object o)
          This method does the same as ClasspathConfigurable.addClasspathEntry(Object).
 T addClasspathEntry(Object o)
          Add one or several classpath entries to the classpath.
 T addJvmOption(String option)
           
 T addJvmOptions(Object o)
          Add one or several JVM options.
 T clearClasspathDecorators()
          Clear the list of classpath decorators.
 T clearClasspathEntries()
          Clear the list of classpath entries.
 T clearJvmOptions()
           
 T setJavaExecutable(Object o)
           
 T setJavaHome(Object o)
           
 
Methods inherited from class org.schmant.task.template.process.AbstractExtProcessTaskFactory
addArgument, addArguments, addEnvironmentVariable, addEnvironmentVariables, clearArguments, clearEnvironmentVariables, setFailOnErrors, setInheritEnvironmentVariables, setStderrStrategy, setStdoutStrategy, setWorkingDirectory
 
Methods inherited from class org.schmant.task.stub.AbstractTaskFactory
copy, create, createSpecification, getLastCreated, getSpecification, getThis, run, setLogFooter, setLogHeader, setReportLevel, setTraceLogging, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.schmant.task.template.process.ExtProcessConfigurable
addEnvironmentVariable, addEnvironmentVariables, clearEnvironmentVariables, setFailOnErrors, setInheritEnvironmentVariables, setStderrStrategy, setStdoutStrategy, setWorkingDirectory
 
Methods inherited from interface org.schmant.task.confable.ArgumentsConfigurable
addArgument, addArguments, clearArguments
 

Constructor Detail

AbstractExtJvmTaskFactory

public AbstractExtJvmTaskFactory()
Method Detail

addClasspathEntry

public final T addClasspathEntry(Object o)
Description copied from interface: ClasspathConfigurable
Add one or several classpath entries to the classpath.

Specified by:
addClasspathEntry in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Parameters:
o - The entry or entries. If the object is a collection or array, it is flattened (see FlatteningList). It is up to the implementing object to decide how the object or objects should be interpreted.
Returns:
this

addClasspathEntries

public final T addClasspathEntries(Object o)
Description copied from interface: ClasspathConfigurable
This method does the same as ClasspathConfigurable.addClasspathEntry(Object).

Specified by:
addClasspathEntries in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Parameters:
o - The entries. See ClasspathConfigurable.addClasspathEntry(Object).
Returns:
this

clearClasspathEntries

public final T clearClasspathEntries()
Description copied from interface: ClasspathConfigurable
Clear the list of classpath entries.

Specified by:
clearClasspathEntries in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Returns:
this.

addClasspathDecorator

public final T addClasspathDecorator(PathDecorator<?,?> cd)
Description copied from interface: ClasspathConfigurable
Add one path decorator.

Specified by:
addClasspathDecorator in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Returns:
this

addClasspathDecorators

public final T addClasspathDecorators(Object o)
Description copied from interface: ClasspathConfigurable
Add one or several path decorators.

Specified by:
addClasspathDecorators in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Parameters:
o - One or an array or collection of classpath decorators (PathDecorator objects).
Returns:
this

clearClasspathDecorators

public final T clearClasspathDecorators()
Description copied from interface: ClasspathConfigurable
Clear the list of classpath decorators.

Specified by:
clearClasspathDecorators in interface ClasspathConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Returns:
this

addJvmOption

public final T addJvmOption(String option)
Specified by:
addJvmOption in interface JvmOptionsConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>

addJvmOptions

public final T addJvmOptions(Object o)
Description copied from interface: JvmOptionsConfigurable
Add one or several JVM options.

Specified by:
addJvmOptions in interface JvmOptionsConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Parameters:
o - One string or an array or collection of strings. Each string is an JVM option.

clearJvmOptions

public final T clearJvmOptions()
Specified by:
clearJvmOptions in interface JvmOptionsConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>

setJavaExecutable

public final T setJavaExecutable(Object o)
                                                                 throws FileNotFoundException
Specified by:
setJavaExecutable in interface ExtJvmConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Throws:
FileNotFoundException

setJavaHome

public final T setJavaHome(Object o)
                                                           throws FileNotFoundException
Specified by:
setJavaHome in interface JavaHomeConfigurable<T extends AbstractExtJvmTaskFactory<T,U>>
Throws:
FileNotFoundException