org.apache.tools.ant.filters

Class TokenFilter.ReplaceRegex

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

public static class TokenFilter.ReplaceRegex
extends TokenFilter.ChainableReaderFilter

filter to replace regex.

Field Summary

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

project

Method Summary

String
filter(String line)
void
setFlags(String flags)
void
setPattern(String from)
the from attribute
void
setReplace(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)
Specified by:
filter in interface TokenFilter.Filter
Parameters:
line - the string to modify
Returns:
the modified string

setFlags

public void setFlags(String flags)
Parameters:
flags - the regex flags

setPattern

public void setPattern(String from)
the from attribute
Parameters:
from - the regex string

setReplace

public void setReplace(String to)
the to attribute
Parameters:
to - the replacement string

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