Package org.apache.tools.ant.taskdefs
Class Filter
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.tools.ant.taskdefs.Filter
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable
 
 public class Filter extends Task Sets a token filter that is used by the file copy tasks to do token substitution. Sets multiple tokens by reading these from a file.- Since:
- Ant 1.1
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Filter()
 - 
Method SummaryModifier and Type Method Description voidexecute()Execute the task.protected voidreadFilters()Read the filters.voidsetFiltersfile(java.io.File filtersFile)The file from which the filters must be read.voidsetToken(java.lang.String token)The token string without @ delimiters.voidsetValue(java.lang.String value)The string that should replace the token during filtered copies.- 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
- 
 
- 
- 
- 
Method Detail- 
setTokenpublic void setToken(java.lang.String token) The token string without @ delimiters.- Parameters:
- token- token to set
 
 - 
setValuepublic void setValue(java.lang.String value) The string that should replace the token during filtered copies.- Parameters:
- value- token replace value
 
 - 
setFiltersfilepublic void setFiltersfile(java.io.File filtersFile) The file from which the filters must be read. This file must be a formatted as a property file.- Parameters:
- filtersFile- filter file
 
 - 
executepublic void execute() throws BuildExceptionExecute the task.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
 - 
readFiltersprotected void readFilters() throws BuildExceptionRead the filters.- Throws:
- BuildException- on error
 
 
- 
 
-