Class Tokens

  • All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<Resource>, ResourceCollection

    public class Tokens
    extends BaseResourceCollectionWrapper
    ResourceCollection consisting of StringResources gathered from tokenizing another ResourceCollection with a Tokenizer implementation.
    Since:
    Ant 1.7
    • Constructor Detail

      • Tokens

        public Tokens()
    • Method Detail

      • setEncoding

        public void setEncoding​(java.lang.String encoding)
        Set the encoding used to create the tokens.
        Parameters:
        encoding - the encoding to use.
      • add

        public void add​(Tokenizer tokenizer)
        Add the nested Tokenizer to this Tokens ResourceCollection. A LineTokenizer will be used by default.
        Parameters:
        tokenizer - the tokenizer to add.
      • dieOnCircularReference

        protected void dieOnCircularReference​(java.util.Stack<java.lang.Object> stk,
                                              Project p)
                                       throws BuildException
        Overrides the BaseResourceCollectionContainer version to check the nested Tokenizer.
        Overrides:
        dieOnCircularReference in class AbstractResourceCollectionWrapper
        Parameters:
        stk - the stack of data types to use (recursively).
        p - the project to use to dereference the references.
        Throws:
        BuildException - on error.