org.apache.tools.ant.filters

Class TokenFilter.ReplaceString

Enclosing Class:
TokenFilter
Implemented Interfaces:
ChainableReader, TokenFilter.Filter

public static class TokenFilter.ReplaceString
extends TokenFilter.ChainableReaderFilter

Simple replace string filter.

Field Summary

Fields inherited from class org.apache.tools.ant.ProjectComponent

project

Method Summary

String
filter(String line)
Filter a string 'line' replacing from with to (C&P from the Replace task)
void
setFrom(String from)
the from attribute
void
setTo(String to)
the to attribute

Methods inherited from class org.apache.tools.ant.filters.TokenFilter.ChainableReaderFilter

chain, setByLine

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Method Details

filter

public String filter(String line)
Filter a string 'line' replacing from with to (C&P from the Replace task)
Specified by:
filter in interface TokenFilter.Filter
Parameters:
line - the string to be filtered
Returns:
the filtered line

setFrom

public void setFrom(String from)
the from attribute
Parameters:
from - the string to replace

setTo

public void setTo(String to)
the to attribute
Parameters:
to - the string to replace 'from' with

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.