Top Description Fields Constructors Methods
org.apache.tools.ant.types.resources

public Class Tokens

extends BaseResourceCollectionWrapper
Class Inheritance
Imports
java.io.IOException, .InputStreamReader, java.nio.charset.Charset, java.util.ArrayList, .Collection, .Collections, .List, .Stack, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.DataType, .Resource, .ResourceCollection, org.apache.tools.ant.util.ConcatResourceInputStream, .LineTokenizer, .Tokenizer

ResourceCollection consisting of StringResources gathered from tokenizing another ResourceCollection with a Tokenizer implementation.
Since
Ant 1.7

Field Summary

Modifier and TypeField and Description
private String
private Tokenizer

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
add(Tokenizer
the tokenizer to add.
tokenizer
)

Add the nested Tokenizer to this Tokens ResourceCollection.

protected synchronized void
dieOnCircularReference(Stack<Object>
the stack of data types to use (recursively).
stk
,
Project
the project to use to dereference the references.
p
)

Overrides org.apache.tools.ant.types.resources.AbstractResourceCollectionWrapper.dieOnCircularReference.

Overrides the BaseResourceCollectionContainer version to check the nested Tokenizer.
protected synchronized Collection<Resource>

Returns:

a Collection of Resources.
getCollection
()

Implements abstract org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper.getCollection.

Sort the contained elements.
public synchronized void
setEncoding(String
the encoding to use.
encoding
)

Set the encoding used to create the tokens.

Inherited from org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper:
createIteratorgetSize

Field Detail

encodingback to summary
private String encoding
tokenizerback to summary
private Tokenizer tokenizer

Constructor Detail

Tokensback to summary
public Tokens()

Method Detail

addback to summary
public synchronized void add(Tokenizer tokenizer)

Add the nested Tokenizer to this Tokens ResourceCollection. A LineTokenizer will be used by default.

Parameters
tokenizer:Tokenizer

the tokenizer to add.

dieOnCircularReferenceback to summary
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p) throws BuildException

Overrides org.apache.tools.ant.types.resources.AbstractResourceCollectionWrapper.dieOnCircularReference.

Overrides the BaseResourceCollectionContainer version to check the nested Tokenizer.

Parameters
stk:Stack<Object>

the stack of data types to use (recursively).

p:Project

the project to use to dereference the references.

Annotations
@Override
Exceptions
BuildException:
on error.
getCollectionback to summary
protected synchronized Collection<Resource> getCollection()

Implements abstract org.apache.tools.ant.types.resources.BaseResourceCollectionWrapper.getCollection.

Sort the contained elements.

Returns:Collection<Resource>

a Collection of Resources.

setEncodingback to summary
public synchronized void setEncoding(String encoding)

Set the encoding used to create the tokens.

Parameters
encoding:String

the encoding to use.