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 Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionclone()
Implement clone.protected ArchiveFileSet
configureArchive
(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 void
dieOnCircularReference
(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.boolean
Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions.iterator()
Merges the nested collections.void
Overrides the base version.int
size()
Sums the sizes of nested archives.Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, 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.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.tools.ant.types.ResourceCollection
isEmpty, stream
-
Constructor Details
-
Archives
public Archives()
-
-
Method Details
-
createZips
Wrapper to identify nested resource collections as ZIP archives.- Returns:
- Union
-
createTars
Wrapper to identify nested resource collections as ZIP archives.- Returns:
- Union
-
size
public int size()Sums the sizes of nested archives.- Specified by:
size
in interfaceResourceCollection
- Returns:
- int
-
iterator
-
isFilesystemOnly
public boolean isFilesystemOnly()Description copied from interface:ResourceCollection
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 aFileProvider
when asked viaResource.as(java.lang.Class<T>)
.- Specified by:
isFilesystemOnly
in interfaceResourceCollection
- Returns:
- false
-
setRefid
-
clone
-
grabArchives
Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.- Returns:
- Iterator<ArchiveFileSet>
-
configureArchive
Configures the archivefileset based on this type's settings, set the source.- Parameters:
afs
- ArchiveFileSetsrc
- Resource- Returns:
- ArchiveFileSet
-
dieOnCircularReference
Overrides the version of DataType to recurse on all DataType child elements that may have been added.- Overrides:
dieOnCircularReference
in classDataType
- Parameters:
stk
- the stack of data types to use (recursively).p
- the project to use to dereference the references.- Throws:
BuildException
- on error.
-