org.schmant.task.apache.ant
Class AntTF

java.lang.Object
  extended by org.schmant.task.stub.AbstractTaskFactory<T,U>
      extended by org.schmant.task.template.process.AbstractExtProcessTaskFactory<AntTF,AntTask>
          extended by org.schmant.task.apache.ant.AntTF
All Implemented Interfaces:
ActionTaskConfigurable<AntTF>, ActionTaskFactory<AntTF,AntTask>, AntConfigurable<AntTF>, ArgumentsConfigurable<AntTF>, LibPathConfigurable<AntTF>, LoggingConfigurable<AntTF>, SourceConfigurable<AntTF>, TaskFactory<AntTF,AntTask>, TaskRunnable, ExtProcessConfigurable<AntTF>

public final class AntTF
extends AbstractExtProcessTaskFactory<AntTF,AntTask>
implements AntConfigurable<AntTF>, ActionTaskFactory<AntTF,AntTask>

Factory for the AntTask.

See AntTF

Since:
0.5
Author:
Karl Gustafsson
See Also:
AntTask
Task_package:
org.apache.ant

Constructor Summary
AntTF()
           
 
Method Summary
 AntTF addLibPathDecorator(PathDecorator<?,?> cd)
          Add one path decorator.
 AntTF addLibPathDecorators(Object o)
          Add one or several library path decorators.
 AntTF addLibPathEntries(Object o)
          This method does the same as LibPathConfigurable.addLibPathEntry(Object).
 AntTF addLibPathEntry(Object o)
          Add one entry to the library path.
 AntTF addProperties(Map<String,String> m)
           
 AntTF addProperty(String name, String value)
           
 AntTF addSource(Object o)
          Add one or several sources.
 AntTF addSources(Object o)
          This method does the same as SourceConfigurable.addSource(Object)
 AntTF addTarget(String name)
           
 AntTF addTargets(Object o)
           
 AntTF clearLibPathDecorators()
           
 AntTF clearLibPathEntries()
           
 AntTF clearProperties()
           
 AntTF clearSources()
          Clear the collection of sources.
 AntTF clearTargets()
           
protected  AntTask createSpecification()
          Subclasses implement this to create the task specification object that this factory uses to configure the task that it is creating.
 AntTF setEmacsLogging(boolean b)
           
 AntTF setKeepGoing(boolean b)
           
 AntTF setLogFile(Object o)
           
 AntTF setLogLevel(AntLogLevel l)
           
 AntTF setNoUserLib(boolean b)
           
 AntTF setPropertyFile(Object o)
           
 AntTF setRelativeToBase(RelativeLocation rl)
          This property is set with the task's source's location relative to a base location if the task is run within a recursive task.
 AntTF setSource(Object o)
          Set one or several sources, discarding previously set sources.
 AntTF setSourceBody(String s)
          Default target is "doit", basedir="." (Schmant script directory)
 AntTF setSources(Object o)
          This method does the same as SourceConfigurable.setSource(Object)
 AntTF setSourceTargetBody(String s)
          When using only one Ant target in the script.
 
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, 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.TaskFactory
copy, create, getLastCreated, getSpecification
 
Methods inherited from interface org.schmant.task.confable.LoggingConfigurable
setLogFooter, setLogHeader, setReportLevel, setTraceLogging
 
Methods inherited from interface org.schmant.task.TaskRunnable
run
 

Constructor Detail

AntTF

public AntTF()
Method Detail

setSource

public AntTF setSource(Object o)
Description copied from interface: SourceConfigurable
Set one or several sources, discarding previously set sources.

Specified by:
setSource in interface SourceConfigurable<AntTF>
Parameters:
o - The source. If this is a Collection or an array, it is flattened (see FlatteningList), and all objects in the collection or array are set.
Returns:
this

setSources

public AntTF setSources(Object o)
Description copied from interface: SourceConfigurable
This method does the same as SourceConfigurable.setSource(Object)

Specified by:
setSources in interface SourceConfigurable<AntTF>
Parameters:
o - The source or sources.
Returns:
this

addSource

public AntTF addSource(Object o)
Description copied from interface: SourceConfigurable
Add one or several sources.

Specified by:
addSource in interface SourceConfigurable<AntTF>
Parameters:
o - The source. If this is a Collection or an array, it is flattened (see FlatteningList), and all sources in the collection or array are added.
Returns:
this

addSources

public AntTF addSources(Object o)
Description copied from interface: SourceConfigurable
This method does the same as SourceConfigurable.addSource(Object)

Specified by:
addSources in interface SourceConfigurable<AntTF>
Parameters:
o - The source or sources.
Returns:
this

clearSources

public AntTF clearSources()
Description copied from interface: SourceConfigurable
Clear the collection of sources.

Specified by:
clearSources in interface SourceConfigurable<AntTF>
Returns:
this.

setSourceBody

public AntTF setSourceBody(String s)
Description copied from interface: AntConfigurable
Default target is "doit", basedir="." (Schmant script directory)

Specified by:
setSourceBody in interface AntConfigurable<AntTF>

setSourceTargetBody

public AntTF setSourceTargetBody(String s)
Description copied from interface: AntConfigurable
When using only one Ant target in the script.

Specified by:
setSourceTargetBody in interface AntConfigurable<AntTF>

setRelativeToBase

public AntTF setRelativeToBase(RelativeLocation rl)
Description copied from interface: SourceConfigurable
This property is set with the task's source's location relative to a base location if the task is run within a recursive task. The base location is the location of the source of the recursive task.

If the SourceConfigurable (this object) is an action task factory that is used in a recursive action task, the recursive action task sets this property for each created task.

Specified by:
setRelativeToBase in interface SourceConfigurable<AntTF>
Parameters:
rl - The source's location relative to the base location.
Returns:
this

addProperty

public AntTF addProperty(String name,
                         String value)
Specified by:
addProperty in interface AntConfigurable<AntTF>

addProperties

public AntTF addProperties(Map<String,String> m)
Specified by:
addProperties in interface AntConfigurable<AntTF>

clearProperties

public AntTF clearProperties()
Specified by:
clearProperties in interface AntConfigurable<AntTF>

setLogLevel

public AntTF setLogLevel(AntLogLevel l)
Specified by:
setLogLevel in interface AntConfigurable<AntTF>

setLogFile

public AntTF setLogFile(Object o)
Specified by:
setLogFile in interface AntConfigurable<AntTF>

addTarget

public AntTF addTarget(String name)
Specified by:
addTarget in interface AntConfigurable<AntTF>

addTargets

public AntTF addTargets(Object o)
Specified by:
addTargets in interface AntConfigurable<AntTF>

clearTargets

public AntTF clearTargets()
Specified by:
clearTargets in interface AntConfigurable<AntTF>

setEmacsLogging

public AntTF setEmacsLogging(boolean b)
Specified by:
setEmacsLogging in interface AntConfigurable<AntTF>

setKeepGoing

public AntTF setKeepGoing(boolean b)
Specified by:
setKeepGoing in interface AntConfigurable<AntTF>

setPropertyFile

public AntTF setPropertyFile(Object o)
Specified by:
setPropertyFile in interface AntConfigurable<AntTF>

setNoUserLib

public AntTF setNoUserLib(boolean b)
Specified by:
setNoUserLib in interface AntConfigurable<AntTF>

addLibPathEntry

public AntTF addLibPathEntry(Object o)
Description copied from interface: LibPathConfigurable
Add one entry to the library path.

Specified by:
addLibPathEntry in interface LibPathConfigurable<AntTF>
Parameters:
o - The entry or entries. If this is a Collection or an array, it is flattened (see FlatteningList). It is up to the object using this to decide how the lib path entry objects should be interpreted.
Returns:
this

addLibPathEntries

public AntTF addLibPathEntries(Object o)
Description copied from interface: LibPathConfigurable
This method does the same as LibPathConfigurable.addLibPathEntry(Object).

Specified by:
addLibPathEntries in interface LibPathConfigurable<AntTF>
Parameters:
o - The entry or entries. If this is a Collection or an array, it is flattened (see FlatteningList). It is up to the object using this to decide how the lib path entry objects should be interpreted.
Returns:
this

clearLibPathEntries

public AntTF clearLibPathEntries()
Specified by:
clearLibPathEntries in interface LibPathConfigurable<AntTF>

addLibPathDecorator

public AntTF addLibPathDecorator(PathDecorator<?,?> cd)
Description copied from interface: LibPathConfigurable
Add one path decorator.

Specified by:
addLibPathDecorator in interface LibPathConfigurable<AntTF>
Returns:
this

addLibPathDecorators

public AntTF addLibPathDecorators(Object o)
Description copied from interface: LibPathConfigurable
Add one or several library path decorators.

Specified by:
addLibPathDecorators in interface LibPathConfigurable<AntTF>
Parameters:
o - A library path decorator or an array or Collection of library path decorators (PathDecorator objects).
Returns:
this

clearLibPathDecorators

public AntTF clearLibPathDecorators()
Specified by:
clearLibPathDecorators in interface LibPathConfigurable<AntTF>

createSpecification

protected AntTask createSpecification()
Description copied from class: AbstractTaskFactory
Subclasses implement this to create the task specification object that this factory uses to configure the task that it is creating.

Specified by:
createSpecification in class AbstractTaskFactory<AntTF,AntTask>