net.sf.antcontrib.logic
Class OutOfDate
Task
net.sf.antcontrib.logic.OutOfDate
- Condition
public class OutOfDate
extends Task
implements Condition
Task to help in calling tasks if generated files are older
than source files.
Sets a given property or runs an internal task.
Based on
org.apache.org.apache.tools.ant.taskdefs.UpToDate
void | addParallel(Parallel doTask) - Embedded do parallel
|
void | addSequential(Sequential doTask) - Embedded do sequential.
|
OutOfDate.DeleteTargets | createDeleteTargets() - optional nested delete element
|
Mapper | createMapper() - Defines the FileNameMapper to use (nested mapper element).
|
Path | createSourcefiles() - Add to the source files
|
Path | createTargetfiles() - Add to the target files
|
boolean | eval() - Evaluate (all) target and source file(s) to
see if the target(s) is/are outoutdate.
|
void | execute() - Sets property to true and/or executes embedded do
if any of the target file(s) do not have a more recent timestamp
than (each of) the source file(s).
|
Iterator | iterator() - Call evalute and return an iterator over the result
|
void | setAllTargets(String allTargets) - A property to contain all the target filenames
|
void | setAllTargetsPath(String allTargetsPath) - A refernce to contain the path of all the targets
|
void | setCollection(OutOfDate.CollectionEnum collection) - Set the collection attribute, controls what is
returned by the iterator method.
|
void | setForce(boolean force) - whether to allways be outofdate
|
void | setOutputSources(String outputSources) - A property to contain the output source files
|
void | setOutputSourcesPath(String outputSourcesPath) - A reference to the path containing all the sources files.
|
void | setOutputTargets(String outputTargets) - A property to contain the output target files
|
void | setOutputTargetsPath(String outputTargetsPath) - A reference to contain the path of target files that
are outofdate
|
void | setProperty(String property) - The property to set if any of the target files are outofdate with
regard to any of the source files.
|
void | setSeparator(String separator) - The separator to use to separate the files
|
void | setValue(String value) - The value to set the named property to the target files
are outofdate
|
void | setVerbose(boolean verbose) - whether to have verbose output
|
addParallel
public void addParallel(Parallel doTask)
Embedded do parallel
doTask
- the parallel to embed
addSequential
public void addSequential(Sequential doTask)
Embedded do sequential.
doTask
- the sequential to embed
createDeleteTargets
public OutOfDate.DeleteTargets createDeleteTargets()
optional nested delete element
- an element to be configured
createMapper
public Mapper createMapper()
Defines the FileNameMapper to use (nested mapper element).
createSourcefiles
public Path createSourcefiles()
Add to the source files
createTargetfiles
public Path createTargetfiles()
Add to the target files
eval
public boolean eval()
Evaluate (all) target and source file(s) to
see if the target(s) is/are outoutdate.
- true if any of the targets are outofdate
execute
public void execute()
Sets property to true and/or executes embedded do
if any of the target file(s) do not have a more recent timestamp
than (each of) the source file(s).
iterator
public Iterator iterator()
Call evalute and return an iterator over the result
- an iterator over the result
setAllTargets
public void setAllTargets(String allTargets)
A property to contain all the target filenames
allTargets
- the name of the property
setAllTargetsPath
public void setAllTargetsPath(String allTargetsPath)
A refernce to contain the path of all the targets
allTargetsPath
- the name of the reference
setCollection
public void setCollection(OutOfDate.CollectionEnum collection)
Set the collection attribute, controls what is
returned by the iterator method.
"sources" the sources that are newer than the corresponding targets.
"targets" the targets that are older or not present than the corresponding
sources.
"allsources" all the sources
"alltargets" all the targets
collection
- "sources" the changes
setForce
public void setForce(boolean force)
whether to allways be outofdate
force
- true means that outofdate is always set, default
false
setOutputSources
public void setOutputSources(String outputSources)
A property to contain the output source files
outputSources
- the name of the property
setOutputSourcesPath
public void setOutputSourcesPath(String outputSourcesPath)
A reference to the path containing all the sources files.
outputSourcesPath
- the name of the reference
setOutputTargets
public void setOutputTargets(String outputTargets)
A property to contain the output target files
outputTargets
- the name of the property
setOutputTargetsPath
public void setOutputTargetsPath(String outputTargetsPath)
A reference to contain the path of target files that
are outofdate
outputTargetsPath
- the name of the reference
setProperty
public void setProperty(String property)
The property to set if any of the target files are outofdate with
regard to any of the source files.
property
- the name of the property to set if Target is outofdate.
setSeparator
public void setSeparator(String separator)
The separator to use to separate the files
separator
- separator used in outout properties
setValue
public void setValue(String value)
The value to set the named property to the target files
are outofdate
value
- the value to set the property
setVerbose
public void setVerbose(boolean verbose)
whether to have verbose output
verbose
- true means that outofdate outputs debug info