org.apache.tools.ant.taskdefs
Class Replace

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

public class Replace
extends MatchingTask

Replaces all the occurrences of the given string token with the given string value of the indicated files.

Author:
Stefano Mazzocchi stefano@apache.org, Erik Langenbach

Inner Class Summary
 class Replace.NestedString
           
 
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
Replace()
           
 
Method Summary
 Replace.NestedString createReplaceToken()
          Nested element.
 Replace.NestedString createReplaceValue()
          Nested element.
 void execute()
          Do the execution.
 void setDir(java.io.File dir)
          Set the source files path when using matching tasks.
 void setFile(java.io.File file)
          Set the source file.
 void setToken(java.lang.String token)
          Set the string token to replace.
 void setValue(java.lang.String value)
          Set the string value to use as token replacement.
 
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
 

Constructor Detail

Replace

public Replace()
Method Detail

execute

public void execute()
             throws BuildException
Do the execution.
Overrides:
execute in class Task
Following copied from class: org.apache.tools.ant.Task
Throws:
BuildException - if someting goes wrong with the build

setFile

public void setFile(java.io.File file)
Set the source file.

setDir

public void setDir(java.io.File dir)
Set the source files path when using matching tasks.

setToken

public void setToken(java.lang.String token)
Set the string token to replace.

setValue

public void setValue(java.lang.String value)
Set the string value to use as token replacement.

createReplaceToken

public Replace.NestedString createReplaceToken()
Nested element.

createReplaceValue

public Replace.NestedString createReplaceValue()
Nested element.


Copyright © 2000 Apache Software Foundation. All Rights Reserved.