org.apache.tools.ant.taskdefs
Class UpToDate

java.lang.Object
  |
  +--org.apache.tools.ant.Task
        |
        +--org.apache.tools.ant.taskdefs.MatchingTask
              |
              +--org.apache.tools.ant.taskdefs.UpToDate

public class UpToDate
extends MatchingTask

Will set the given property if the specified target has a timestamp greater than all of the source files.

Author:
William Ferguson williamf@mincom.com, Hiroaki Nakamura hnakamur@mc.neweb.ne.jp, Stefan Bodewig

Field Summary
protected  Mapper mapperElement
           
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
Fields inherited from class org.apache.tools.ant.Task
description, location, project, target, taskName, taskType, wrapper
 
Constructor Summary
UpToDate()
           
 
Method Summary
 void addSrcfiles(FileSet fs)
          Nested <srcfiles> element.
 Mapper createMapper()
          Defines the FileNameMapper to use (nested mapper element).
 void execute()
          Sets property to true if target files have a more recent timestamp than each of the corresponding source files.
protected  boolean scanDir(java.io.File srcDir, java.lang.String[] files)
           
 void setProperty(java.lang.String property)
          The property to set if the target file is more up to date than each of the source files.
 void setTargetFile(java.io.File file)
          The file which must be more up to date than each of the source files if the property is to be set.
 
Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
createExclude, createInclude, createPatternSet, getDirectoryScanner, setDefaultexcludes, setExcludes, setExcludesfile, setIncludes, setIncludesfile, XsetIgnore, XsetItems
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getProject, getRuntimeConfigurableWrapper, getTaskName, init, log, log, maybeConfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mapperElement

protected Mapper mapperElement
Constructor Detail

UpToDate

public UpToDate()
Method Detail

setProperty

public void setProperty(java.lang.String property)
The property to set if the target file is more up to date than each of the source files.
Parameters:
property - the name of the property to set if Target is up to date.

setTargetFile

public void setTargetFile(java.io.File file)
The file which must be more up to date than each of the source files if the property is to be set.
Parameters:
file - the file which we are checking against.

addSrcfiles

public void addSrcfiles(FileSet fs)
Nested <srcfiles> element.

createMapper

public Mapper createMapper()
                    throws BuildException
Defines the FileNameMapper to use (nested mapper element).

execute

public void execute()
             throws BuildException
Sets property to true if target files have a more recent timestamp than each of the corresponding source files.
Overrides:
execute in class Task
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build

scanDir

protected boolean scanDir(java.io.File srcDir,
                          java.lang.String[] files)


Copyright ? 2000 Apache Software Foundation. All Rights Reserved.