org.apache.tools.ant.types.resources

Class Archives

public class Archives extends DataType implements ResourceCollection, Cloneable

A resource collection that treats all nested resources as archives and returns the contents of the archives as its content.

Since: Ant 1.8.0

Method Summary
Objectclone()
Implement clone.
protected ArchiveFileSetconfigureArchive(ArchiveFileSet afs, Resource src)
Configures the archivefileset based on this type's settings, set the source.
UnioncreateTars()
Wrapper to identify nested resource collections as ZIP archives.
UnioncreateZips()
Wrapper to identify nested resource collections as ZIP archives.
protected voiddieOnCircularReference(Stack stk, Project p)
Overrides the version of DataType to recurse on all DataType child elements that may have been added.
protected IteratorgrabArchives()
Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.
booleanisFilesystemOnly()
Iteratoriterator()
Merges the nested collections.
voidsetRefid(Reference r)
Overrides the base version.
intsize()
Sums the sizes of nested archives.

Method Detail

clone

public Object clone()
Implement clone. The nested resource collections are cloned as well.

Returns: a cloned instance.

configureArchive

protected ArchiveFileSet configureArchive(ArchiveFileSet afs, Resource src)
Configures the archivefileset based on this type's settings, set the source.

createTars

public Union createTars()
Wrapper to identify nested resource collections as ZIP archives.

createZips

public Union createZips()
Wrapper to identify nested resource collections as ZIP archives.

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.

grabArchives

protected Iterator grabArchives()
Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.

isFilesystemOnly

public boolean isFilesystemOnly()

Returns: false

iterator

public Iterator iterator()
Merges the nested collections.

setRefid

public void setRefid(Reference r)
Overrides the base version.

Parameters: r the Reference to set.

size

public int size()
Sums the sizes of nested archives.