org.apache.tools.ant.taskdefs
public class KeySubst extends Task
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
Method Summary | |
---|---|
void | execute()
Do the execution. |
static void | main(String[] args)
A test method. |
static String | replace(String origString, Hashtable keys)
Does replacement on text using the hashtable of keys. |
void | setDest(File dest)
Set the destination file. |
void | setKeys(String keys)
Sets the keys.
|
void | setSep(String sep)
Sets the separator between name=value arguments
in setKeys(). |
void | setSrc(File s)
Set the source file. |
Throws: BuildException on error
Parameters: args not used
Parameters: origString an input string keys mapping of keys to values
Returns: the string with the replacements in it.
Throws: BuildException on error
Parameters: dest the destination file
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 String
value
Parameters: sep the separator string
Parameters: s the source file