net.sf.antcontrib.logic
Class OutOfDate

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.Task
              |
              +--net.sf.antcontrib.logic.OutOfDate
All Implemented Interfaces:
org.apache.tools.ant.taskdefs.condition.Condition

public class OutOfDate
extends org.apache.tools.ant.Task
implements org.apache.tools.ant.taskdefs.condition.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

Author:
peter reilly

Inner Class Summary
 class OutOfDate.DeleteTargets
          nested delete targets
static class OutOfDate.MyMapper
           
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
OutOfDate()
           
 
Method Summary
 void addParallel(org.apache.tools.ant.taskdefs.Parallel doTask)
          Embedded do sequential.
 void addSequential(org.apache.tools.ant.taskdefs.Sequential doTask)
          Embedded do sequential.
 OutOfDate.DeleteTargets createDeleteTargets()
          optional nested delete element
 org.apache.tools.ant.types.Mapper createMapper()
          Defines the FileNameMapper to use (nested mapper element).
 org.apache.tools.ant.types.Path createSourcefiles()
           
 org.apache.tools.ant.types.Path createTargetfiles()
           
 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).
 void setAllTargets(java.lang.String allTargets)
           
 void setAllTargetsPath(java.lang.String allTargetsPath)
           
 void setForce(boolean force)
          whether to allways be outofdate
 void setOutputSources(java.lang.String outputSources)
           
 void setOutputSourcesPath(java.lang.String outputSourcesPath)
           
 void setOutputTargets(java.lang.String outputTargets)
           
 void setOutputTargetsPath(java.lang.String outputTargetsPath)
           
 void setProperty(java.lang.String property)
          The property to set if any of the target files are outofdate with regard to any of the source files.
 void setSeparator(java.lang.String separator)
          The separator to use to separate the files
 void setValue(java.lang.String value)
          The value to set the named property to the target files are outofdate
 void setVerbose(boolean verbose)
          whether to have verbose output
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutOfDate

public OutOfDate()
Method Detail

createMapper

public org.apache.tools.ant.types.Mapper createMapper()
Defines the FileNameMapper to use (nested mapper element).

setProperty

public void setProperty(java.lang.String property)
The property to set if any of the target files are outofdate with regard to any of the source files.
Parameters:
property - the name of the property to set if Target is outofdate.

setSeparator

public void setSeparator(java.lang.String separator)
The separator to use to separate the files

setValue

public void setValue(java.lang.String value)
The value to set the named property to the target files are outofdate
Parameters:
value - the value to set the property

setForce

public void setForce(boolean force)
whether to allways be outofdate
Parameters:
force - true means that outofdate is always set, default false

setVerbose

public void setVerbose(boolean verbose)
whether to have verbose output
Parameters:
verbose - true means that outofdate outputs debug info

createTargetfiles

public org.apache.tools.ant.types.Path createTargetfiles()

createSourcefiles

public org.apache.tools.ant.types.Path createSourcefiles()

setOutputSources

public void setOutputSources(java.lang.String outputSources)

setOutputTargets

public void setOutputTargets(java.lang.String outputTargets)

setOutputTargetsPath

public void setOutputTargetsPath(java.lang.String outputTargetsPath)

setAllTargetsPath

public void setAllTargetsPath(java.lang.String allTargetsPath)

setAllTargets

public void setAllTargets(java.lang.String allTargets)

setOutputSourcesPath

public void setOutputSourcesPath(java.lang.String outputSourcesPath)

createDeleteTargets

public OutOfDate.DeleteTargets createDeleteTargets()
optional nested delete element

addParallel

public void addParallel(org.apache.tools.ant.taskdefs.Parallel doTask)
Embedded do sequential.

addSequential

public void addSequential(org.apache.tools.ant.taskdefs.Sequential doTask)
Embedded do sequential.

eval

public boolean eval()
Evaluate (all) target and source file(s) to see if the target(s) is/are outoutdate.
Specified by:
eval in interface org.apache.tools.ant.taskdefs.condition.Condition

execute

public void execute()
             throws org.apache.tools.ant.BuildException
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).
Overrides:
execute in class org.apache.tools.ant.Task