Class Archives
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.resources.Archives
- All Implemented Interfaces:
- Cloneable,- Iterable<Resource>,- ResourceCollection
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 SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionclone()Implement clone.protected ArchiveFileSetconfigureArchive(ArchiveFileSet afs, Resource src) Configures the archivefileset based on this type's settings, set the source.Wrapper to identify nested resource collections as ZIP archives.Wrapper to identify nested resource collections as ZIP archives.protected voiddieOnCircularReference(Stack<Object> stk, Project p) Overrides the version of DataType to recurse on all DataType child elements that may have been added.protected Iterator<ArchiveFileSet> Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.booleanIndicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions.iterator()Merges the nested collections.voidOverrides the base version.intsize()Sums the sizes of nested archives.Methods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes, toStringMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
- 
Constructor Details- 
Archivespublic Archives()
 
- 
- 
Method Details- 
createZipsWrapper to identify nested resource collections as ZIP archives.- Returns:
- Union
 
- 
createTarsWrapper to identify nested resource collections as ZIP archives.- Returns:
- Union
 
- 
sizepublic int size()Sums the sizes of nested archives.- Specified by:
- sizein interface- ResourceCollection
- Returns:
- int
 
- 
iterator
- 
isFilesystemOnlypublic boolean isFilesystemOnly()Description copied from interface:ResourceCollectionIndicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. If true, all resources returned from this collection should respond with aFileProviderwhen asked viaResource.as(java.lang.Class<T>).- Specified by:
- isFilesystemOnlyin interface- ResourceCollection
- Returns:
- false
 
- 
setRefid
- 
clone
- 
grabArchivesTurns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.- Returns:
- Iterator<ArchiveFileSet>
 
- 
configureArchiveConfigures the archivefileset based on this type's settings, set the source.- Parameters:
- afs- ArchiveFileSet
- src- Resource
- Returns:
- ArchiveFileSet
 
- 
dieOnCircularReferenceOverrides the version of DataType to recurse on all DataType child elements that may have been added.- Overrides:
- dieOnCircularReferencein class- DataType
- Parameters:
- stk- the stack of data types to use (recursively).
- p- the project to use to dereference the references.
- Throws:
- BuildException- on error.
 
 
-