FileDocCategorySizeDatePackage
FilterChain.javaAPI DocApache Ant 1.708852Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.types

FilterChain

public class FilterChain extends DataType implements Cloneable
FilterChain may contain a chained set of filter readers.

Fields Summary
private Vector
filterReaders
Constructors Summary
Methods Summary
public voidadd(org.apache.tools.ant.filters.ChainableReader filter)
Add a chainfilter filter.

param
filter a ChainableReader value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public voidaddClassConstants(org.apache.tools.ant.filters.ClassConstants classConstants)
Add a ClassConstants filter.

param
classConstants a ClassConstants value

        filterReaders.addElement(classConstants);
    
public voidaddContainsRegex(TokenFilter.ContainsRegex filter)
Add a containsregex filter.

param
filter a TokenFilter.ContainsRegex value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public voidaddDeleteCharacters(TokenFilter.DeleteCharacters filter)
Add a delete characters filter.

param
filter a TokenFilter.DeleteCharacters value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public voidaddEscapeUnicode(org.apache.tools.ant.filters.EscapeUnicode escapeUnicode)
Add an EscapeUnicode filter.

param
escapeUnicode an EscapeUnicode value
since
Ant 1.6

        filterReaders.addElement(escapeUnicode);
    
public voidaddExpandProperties(org.apache.tools.ant.filters.ExpandProperties expandProperties)
Add an ExpandProperties filter.

param
expandProperties an ExpandProperties value

        filterReaders.addElement(expandProperties);
    
public voidaddFilterReader(AntFilterReader filterReader)
Add an AntFilterReader filter.

param
filterReader an AntFilterReader value


                  
         
        filterReaders.addElement(filterReader);
    
public voidaddHeadFilter(org.apache.tools.ant.filters.HeadFilter headFilter)
Add a HeadFilter filter.

param
headFilter a HeadFilter value

        filterReaders.addElement(headFilter);
    
public voidaddIgnoreBlank(TokenFilter.IgnoreBlank filter)
Add an ignoreBlank filter.

param
filter a TokenFilter.IgnoreBlank value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public voidaddLineContains(org.apache.tools.ant.filters.LineContains lineContains)
Add a LineContains filter.

param
lineContains a LineContains value

        filterReaders.addElement(lineContains);
    
public voidaddLineContainsRegExp(org.apache.tools.ant.filters.LineContainsRegExp lineContainsRegExp)
Add a LineContainsRegExp filter.

param
lineContainsRegExp a LineContainsRegExp value

        filterReaders.addElement(lineContainsRegExp);
    
public voidaddPrefixLines(org.apache.tools.ant.filters.PrefixLines prefixLines)
Add a PrefixLines filter.

param
prefixLines a PrefixLines value

        filterReaders.addElement(prefixLines);
    
public voidaddReplaceRegex(TokenFilter.ReplaceRegex filter)
Add a replaceregex filter.

param
filter a TokenFilter.ReplaceRegex value

        filterReaders.addElement(filter);
    
public voidaddReplaceString(TokenFilter.ReplaceString filter)
Add a replacestring filter.

param
filter a TokenFilter.ReplaceString value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public voidaddReplaceTokens(org.apache.tools.ant.filters.ReplaceTokens replaceTokens)
Add a ReplaceTokens filter.

param
replaceTokens a ReplaceTokens value

        filterReaders.addElement(replaceTokens);
    
public voidaddStripJavaComments(org.apache.tools.ant.filters.StripJavaComments stripJavaComments)
Add a StripJavaCommands filter.

param
stripJavaComments a StripJavaComments value

        filterReaders.addElement(stripJavaComments);
    
public voidaddStripLineBreaks(org.apache.tools.ant.filters.StripLineBreaks stripLineBreaks)
Add a StripLineBreaks filter.

param
stripLineBreaks a StripLineBreaks value

        filterReaders.addElement(stripLineBreaks);
    
public voidaddStripLineComments(org.apache.tools.ant.filters.StripLineComments stripLineComments)
Add a StripLineComments filter.

param
stripLineComments a StripLineComments value

        filterReaders.addElement(stripLineComments);
    
public voidaddTabsToSpaces(org.apache.tools.ant.filters.TabsToSpaces tabsToSpaces)
Add a TabsToSpaces filter.

param
tabsToSpaces a TabsToSpaces value

        filterReaders.addElement(tabsToSpaces);
    
public voidaddTailFilter(org.apache.tools.ant.filters.TailFilter tailFilter)
Add a TailFilter filter.

param
tailFilter a TailFilter value

        filterReaders.addElement(tailFilter);
    
public voidaddTokenFilter(org.apache.tools.ant.filters.TokenFilter tokenFilter)
Add a TokenFilter filter.

param
tokenFilter a TokenFilter value
since
Ant 1.6

        filterReaders.addElement(tokenFilter);
    
public voidaddTrim(TokenFilter.Trim filter)
Add a trim filter.

param
filter a TokenFilter.Trim value
since
Ant 1.6

        filterReaders.addElement(filter);
    
public java.util.VectorgetFilterReaders()
Return the filters.

return
a Vector value containing the filters

        return filterReaders;
    
public voidsetRefid(Reference r)
Makes this instance in effect a reference to another FilterChain instance.

You must not set another attribute or nest elements inside this element if you make it a reference.

param
r the reference to which this instance is associated
exception
BuildException if this instance already has been configured.

        if (!filterReaders.isEmpty()) {
            throw tooManyAttributes();
        }
        // change this to get the objects from the other reference
        Object o = r.getReferencedObject(getProject());
        if (o instanceof FilterChain) {
            FilterChain fc = (FilterChain) o;
            filterReaders = fc.getFilterReaders();
        } else {
            String msg = r.getRefId() + " doesn\'t refer to a FilterChain";
            throw new BuildException(msg);
        }

        super.setRefid(r);