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

public Class Archives

extends DataType
implements ResourceCollection, Cloneable
Class Inheritance
All Implemented Interfaces
java.lang.Cloneable, org.apache.tools.ant.types.ResourceCollection, java.lang.Iterable
Imports
java.util.Iterator, .LinkedList, .List, .Stack, java.util.stream.Stream, org.apache.tools.ant.BuildException, .Project, org.apache.tools.ant.types.ArchiveFileSet, .DataType, .Reference, .Resource, .ResourceCollection, .TarFileSet, .ZipFileSet

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

Field Summary

Modifier and TypeField and Description
private Union
private Union
Inherited from org.apache.tools.ant.types.DataType:
checkedref

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

a cloned instance.
clone
()

Overrides org.apache.tools.ant.types.DataType.clone.

Implement clone.
protected ArchiveFileSet

Returns:

ArchiveFileSet
configureArchive
(final ArchiveFileSet
ArchiveFileSet
afs
,
final Resource
Resource
src
)

Configures the archivefileset based on this type's settings, set the source.

public Union

Returns:

Union
createTars
()

Wrapper to identify nested resource collections as ZIP archives.

public Union

Returns:

Union
createZips
()

Wrapper to identify nested resource collections as ZIP archives.

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

Overrides org.apache.tools.ant.types.DataType.dieOnCircularReference.

Overrides the version of DataType to recurse on all DataType child elements that may have been added.
private Archives
protected Iterator<ArchiveFileSet>

Returns:

Iterator<ArchiveFileSet>
grabArchives
()

Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.

public boolean

Returns:

false
isFilesystemOnly
()

Implements org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly.

Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions.
public Iterator<Resource>

Returns:

Iterator<Resource>
iterator
()

Implements java.lang.Iterable.iterator.

Merges the nested collections.
public void
setRefid(final Reference
the Reference to set.
r
)

Overrides org.apache.tools.ant.types.DataType.setRefid.

Overrides the base version.
public int

Returns:

int
size
()

Implements org.apache.tools.ant.types.ResourceCollection.size.

Sums the sizes of nested archives.
private Stream<ArchiveFileSet>
Inherited from org.apache.tools.ant.types.DataType:
checkAttributesAllowedcheckChildrenAllowedcircularReferencedieOnCircularReferencedieOnCircularReferencegetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetCheckedRefgetDataTypeNamegetRefidinvokeCircularReferenceCheckisCheckedisReferencenoChildrenAllowedpushAndInvokeCircularReferenceChecksetCheckedtooManyAttributestoString

Field Detail

tarsback to summary
private Union tars
zipsback to summary
private Union zips

Constructor Detail

Archivesback to summary
public Archives()

Method Detail

cloneback to summary
public Object clone()

Overrides org.apache.tools.ant.types.DataType.clone.

Implement clone. The nested resource collections are cloned as well.

Returns:Object

a cloned instance.

Annotations
@Override
configureArchiveback to summary
protected ArchiveFileSet configureArchive(final ArchiveFileSet afs, final Resource src)

Configures the archivefileset based on this type's settings, set the source.

Parameters
afs:ArchiveFileSet

ArchiveFileSet

src:Resource

Resource

Returns:ArchiveFileSet

ArchiveFileSet

createTarsback to summary
public Union createTars()

Wrapper to identify nested resource collections as ZIP archives.

Returns:Union

Union

createZipsback to summary
public Union createZips()

Wrapper to identify nested resource collections as ZIP archives.

Returns:Union

Union

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

Overrides org.apache.tools.ant.types.DataType.dieOnCircularReference.

Overrides the version of DataType to recurse on all DataType child elements that may have been added.

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.
getRefback to summary
private Archives getRef()
grabArchivesback to summary
protected Iterator<ArchiveFileSet> grabArchives()

Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.

Returns:Iterator<ArchiveFileSet>

Iterator<ArchiveFileSet>

isFilesystemOnlyback to summary
public boolean isFilesystemOnly()

Implements org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly.

Doc from org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly.

Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. If true, all resources returned from this collection should respond with a org.apache.tools.ant.types.resources.FileProvider when asked via Resource#as.

Returns:boolean

false

iteratorback to summary
public Iterator<Resource> iterator()

Implements java.lang.Iterable.iterator.

Merges the nested collections.

Returns:Iterator<Resource>

Iterator<Resource>

setRefidback to summary
public void setRefid(final Reference r)

Overrides org.apache.tools.ant.types.DataType.setRefid.

Overrides the base version.

Parameters
r:Reference

the Reference to set.

Annotations
@Override
sizeback to summary
public int size()

Implements org.apache.tools.ant.types.ResourceCollection.size.

Sums the sizes of nested archives.

Returns:int

int

Annotations
@Override
streamArchivesback to summary
private Stream<ArchiveFileSet> streamArchives()