Package org.apache.tools.ant.taskdefs
Class Replace.Replacefilter
java.lang.Object
org.apache.tools.ant.taskdefs.Replace.Replacefilter
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreate a token to filter as the text of a nested element.Create a string to replace the token as the text of a nested element.Get the name of the property whose value is to serve as the replacement value.Get the replacement value for this filter token.getToken()
Get the string to search for.getValue()
Get replacementString
.void
setProperty
(String property) Set the name of the property whose value is to serve as the replacement value; required ifvalue
is not set.void
Set the token to replace.void
The replacement string; required ifproperty
is not set.void
validate()
Validate the filter's configuration.
-
Constructor Details
-
Replacefilter
public Replacefilter()
-
-
Method Details
-
validate
Validate the filter's configuration.- Throws:
BuildException
- if any part is invalid.
-
getReplaceValue
Get the replacement value for this filter token.- Returns:
- the replacement value
-
setToken
-
getToken
-
setValue
The replacement string; required ifproperty
is not set.- Parameters:
value
-String
value to replace.
-
getValue
-
setProperty
Set the name of the property whose value is to serve as the replacement value; required ifvalue
is not set.- Parameters:
property
- property name.
-
getProperty
Get the name of the property whose value is to serve as the replacement value.- Returns:
- property or null.
-
createReplaceToken
Create a token to filter as the text of a nested element.- Returns:
- nested token
NestedString
to configure. - Since:
- Ant 1.8.0
-
createReplaceValue
Create a string to replace the token as the text of a nested element.- Returns:
- replacement value
NestedString
to configure. - Since:
- Ant 1.8.0
-