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:
- java.lang.Cloneable,- java.lang.Iterable<Resource>,- ResourceCollection
 
 public class Archives extends DataType implements ResourceCollection, java.lang.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
 
- 
- 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 
- 
 - 
Constructor SummaryConstructors Constructor Description Archives()
 - 
Method SummaryModifier and Type Method Description java.lang.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(java.util.Stack<java.lang.Object> stk, Project p)Overrides the version of DataType to recurse on all DataType child elements that may have been added.protected java.util.Iterator<ArchiveFileSet>grabArchives()Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.booleanisFilesystemOnly()Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions.java.util.Iterator<Resource>iterator()Merges the nested collections.voidsetRefid(Reference r)Overrides 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, toString
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
 - 
Methods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
 
- 
 
- 
- 
- 
Method Detail- 
createZipspublic Union createZips() Wrapper to identify nested resource collections as ZIP archives.- Returns:
- Union
 
 - 
createTarspublic Union createTars() Wrapper 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
 
 - 
iteratorpublic java.util.Iterator<Resource> iterator() Merges the nested collections.- Specified by:
- iteratorin interface- java.lang.Iterable<Resource>
- Returns:
- Iterator<Resource>
 
 - 
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
 
 - 
setRefidpublic void setRefid(Reference r) Overrides the base version.
 - 
clonepublic java.lang.Object clone() Implement clone. The nested resource collections are cloned as well.
 - 
grabArchivesprotected java.util.Iterator<ArchiveFileSet> grabArchives() Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.- Returns:
- Iterator<ArchiveFileSet>
 
 - 
configureArchiveprotected ArchiveFileSet configureArchive(ArchiveFileSet afs, Resource src) Configures the archivefileset based on this type's settings, set the source.- Parameters:
- afs- ArchiveFileSet
- src- Resource
- Returns:
- ArchiveFileSet
 
 - 
dieOnCircularReferenceprotected void dieOnCircularReference(java.util.Stack<java.lang.Object> stk, Project p) throws BuildExceptionOverrides 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.
 
 
- 
 
-