Package org.apache.tools.ant.taskdefs
Class KeySubst
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.tools.ant.taskdefs.KeySubst
- All Implemented Interfaces:
- Cloneable
Deprecated.
KeySubst is deprecated since Ant 1.1. Use Filter + Copy
 instead.
Keyword substitution. Input file is written to output file.
 Do not make input file same as output file.
 Keywords in input files look like this: @foo@. See the docs for the
 setKeys method to understand how to do the substitutions.
- Since:
- Ant 1.1
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidexecute()Deprecated.Do the execution.static voidDeprecated.A test method.static StringDeprecated.Does replacement on text using the hashtable of keys.voidDeprecated.Set the destination file.voidDeprecated.Sets the keys.voidDeprecated.Sets the separator between name=value arguments in setKeys().voidDeprecated.Set the source file.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, setTaskTypeMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
- 
Constructor Details- 
KeySubstpublic KeySubst()Deprecated.
 
- 
- 
Method Details- 
executeDeprecated.Do the execution.- Overrides:
- executein class- Task
- Throws:
- BuildException- on error
 
- 
setSrcDeprecated.Set the source file.- Parameters:
- s- the source file
 
- 
setDestDeprecated.Set the destination file.- Parameters:
- dest- the destination file
 
- 
setSepDeprecated.Sets the separator between name=value arguments in setKeys(). By default it is "*".- Parameters:
- sep- the separator string
 
- 
setKeysDeprecated.Sets the keys. Format string is like this:name=value*name2=value Names are case sensitive. Use the setSep() method to change the * to something else if you need to use * as a name or value. - Parameters:
- keys- a- Stringvalue
 
- 
mainDeprecated.A test method.- Parameters:
- args- not used
 
- 
replacepublic static String replace(String origString, Hashtable<String, String> keys) throws BuildExceptionDeprecated.Does replacement on text using the hashtable of keys.- Parameters:
- origString- an input string
- keys- mapping of keys to values
- Returns:
- the string with the replacements in it.
- Throws:
- BuildException- on error
 
 
-