org.apache.tools.ant.types.resources

Class ResourceList

public class ResourceList extends DataType implements ResourceCollection

Reads a resource as text document and creates a resource for each line.

Since: Ant 1.8.0

Constructor Summary
ResourceList()
Method Summary
voidadd(ResourceCollection rc)
Adds a source.
voidaddFilterChain(FilterChain filter)
Adds a FilterChain.
protected voiddieOnCircularReference(Stack stk, Project p)
Overrides the version of DataType to recurse on all DataType child elements that may have been added.
booleanisFilesystemOnly()
Fulfill the ResourceCollection contract.
Iteratoriterator()
Fulfill the ResourceCollection contract.
voidsetEncoding(String encoding)
Encoding to use for input, defaults to the platform's default encoding.
voidsetRefid(Reference r)
Makes this instance in effect a reference to another ResourceList instance.
intsize()
Fulfill the ResourceCollection contract.

Constructor Detail

ResourceList

public ResourceList()

Method Detail

add

public void add(ResourceCollection rc)
Adds a source.

addFilterChain

public final void addFilterChain(FilterChain filter)
Adds a FilterChain.

dieOnCircularReference

protected void dieOnCircularReference(Stack stk, Project p)
Overrides the version of DataType to recurse on all DataType child elements that may have been added.

Parameters: stk the stack of data types to use (recursively). p the project to use to dereference the references.

Throws: BuildException on error.

isFilesystemOnly

public boolean isFilesystemOnly()
Fulfill the ResourceCollection contract.

Returns: whether this is a filesystem-only resource collection.

iterator

public final Iterator iterator()
Fulfill the ResourceCollection contract. The Iterator returned will throw ConcurrentModificationExceptions if ResourceCollections are added to this container while the Iterator is in use.

Returns: a "fail-fast" Iterator.

setEncoding

public final void setEncoding(String encoding)
Encoding to use for input, defaults to the platform's default encoding.

For a list of possible values see http://java.sun.com/j2se/1.5.0/docs/guide/intl/encoding.doc.html .

setRefid

public void setRefid(Reference r)
Makes this instance in effect a reference to another ResourceList instance.

size

public int size()
Fulfill the ResourceCollection contract.

Returns: number of elements as int.