Package org.apache.tools.ant.taskdefs

# Class Replace.Replacefilter

java.lang.Object
org.apache.tools.ant.taskdefs.Replace.Replacefilter

Enclosing class:
  Replace

public class Replace.Replacefilter extends Object
A filter to apply.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Replacefilter()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Replace.NestedString`
  `createReplaceToken()`
  Create a token to filter as the text of a nested element.
  `Replace.NestedString`
  `createReplaceValue()`
  Create a string to replace the token as the text of a nested element.
  `String`
  `getProperty()`
  Get the name of the property whose value is to serve as the replacement value.
  `String`
  `getReplaceValue()`
  Get the replacement value for this filter token.
  `String`
  `getToken()`
  Get the string to search for.
  `String`
  `getValue()`
  Get replacement `String`.
  `void`
  `setProperty(String property)`
  Set the name of the property whose value is to serve as the replacement value; required if `value` is not set.
  `void`
  `setToken(String t)`
  Set the token to replace.
  `void`
  `setValue(String value)`
  The replacement string; required if `property` is not set.
  `void`
  `validate()`
  Validate the filter's configuration.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Replacefilter

    public Replacefilter()

- ## Method Details

  - ### validate

    public void validate() throws BuildException
    Validate the filter's configuration.
    Throws:
      `BuildException` - if any part is invalid.

  - ### getReplaceValue

    public String getReplaceValue()
    Get the replacement value for this filter token.
    Returns:
      the replacement value

  - ### setToken

    public void setToken(String t)
    Set the token to replace.
    Parameters:
      `t` - `String` token.

  - ### getToken

    public String getToken()
    Get the string to search for.
    Returns:
      current `String` token.

  - ### setValue

    public void setValue(String value)
    The replacement string; required if `property` is not set.
    Parameters:
      `value` - `String` value to replace.

  - ### getValue

    public String getValue()
    Get replacement `String`.
    Returns:
      replacement or null.

  - ### setProperty

    public void setProperty(String property)
    Set the name of the property whose value is to serve as the replacement value; required if `value` is not set.
    Parameters:
      `property` - property name.

  - ### getProperty

    public String getProperty()
    Get the name of the property whose value is to serve as the replacement value.
    Returns:
      property or null.

  - ### createReplaceToken

    public Replace.NestedString 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

    public Replace.NestedString 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