org.apache.ant.compress.resources

## Class Archives

- java.lang.Object
- - org.apache.tools.ant.ProjectComponent
  - - org.apache.tools.ant.types.DataType
    - - org.apache.ant.compress.resources.Archives

- All Implemented Interfaces:
    java.lang.Cloneable, java.lang.Iterable<org.apache.tools.ant.types.Resource>, org.apache.tools.ant.types.ResourceCollection

      public class Archives
      extends org.apache.tools.ant.types.DataType
      implements org.apache.tools.ant.types.ResourceCollection, java.lang.Cloneable

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

- - ### Field Summary

    - ### Fields inherited from class org.apache.tools.ant.types.DataType

      `checked, ref`

    - ### Fields inherited from class org.apache.tools.ant.ProjectComponent

      `description, location, project`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Archives()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.Object` | `clone()` Implement clone.
    `protected org.apache.tools.ant.types.ArchiveFileSet` | `configureArchive(org.apache.tools.ant.types.ArchiveFileSet afs, org.apache.tools.ant.types.Resource src)` Configures the archivefileset based on this type's settings, set the source.
    `org.apache.tools.ant.types.resources.Union` | `createArjs()` Wrapper to identify nested resource collections as ARJ archives.
    `org.apache.tools.ant.types.resources.Union` | `createArs()` Wrapper to identify nested resource collections as AR archives.
    `org.apache.tools.ant.types.resources.Union` | `createCpios()` Wrapper to identify nested resource collections as CPIO archives.
    `org.apache.tools.ant.types.resources.Union` | `createDumps()` Wrapper to identify nested resource collections as Unix dump archives.
    `org.apache.tools.ant.types.resources.Union` | `createSevenzs()` Wrapper to identify nested resource collections as 7z archives.
    `org.apache.tools.ant.types.resources.Union` | `createTars()` Wrapper to identify nested resource collections as ZIP archives.
    `org.apache.tools.ant.types.resources.Union` | `createZips()` Wrapper to identify nested resource collections as ZIP archives.
    `protected void` | `dieOnCircularReference(java.util.Stack stk, org.apache.tools.ant.Project p)` Overrides the version of DataType to recurse on all DataType child elements that may have been added.
    `protected java.util.Iterator` | `grabArchives()` Turns all nested resources into corresponding ArchiveFileSets and returns an iterator over the collected archives.
    `boolean` | `isFilesystemOnly()`
    `java.util.Iterator` | `iterator()` Merges the nested collections.
    `void` | `setRefid(org.apache.tools.ant.types.Reference r)` 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, 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`

- - ### Constructor Detail

    - #### Archives

          public Archives()

  - ### Method Detail

    - #### createZips

          public org.apache.tools.ant.types.resources.Union createZips()

      Wrapper to identify nested resource collections as ZIP archives.

    - #### createTars

          public org.apache.tools.ant.types.resources.Union createTars()

      Wrapper to identify nested resource collections as ZIP archives.

    - #### createArs

          public org.apache.tools.ant.types.resources.Union createArs()

      Wrapper to identify nested resource collections as AR archives.

    - #### createArjs

          public org.apache.tools.ant.types.resources.Union createArjs()

      Wrapper to identify nested resource collections as ARJ archives.
      Since:
        Apache Compress Antlib 1.5

    - #### createCpios

          public org.apache.tools.ant.types.resources.Union createCpios()

      Wrapper to identify nested resource collections as CPIO archives.

    - #### createDumps

          public org.apache.tools.ant.types.resources.Union createDumps()

      Wrapper to identify nested resource collections as Unix dump archives.
      Since:
        Apache Compress Antlib 1.5

    - #### createSevenzs

          public org.apache.tools.ant.types.resources.Union createSevenzs()

      Wrapper to identify nested resource collections as 7z archives.
      Since:
        Apache Compress Antlib 1.5

    - #### size

          public int size()

      Sums the sizes of nested archives.
      Specified by:
        `size` in interface `org.apache.tools.ant.types.ResourceCollection`

    - #### iterator

          public java.util.Iterator iterator()

      Merges the nested collections.
      Specified by:
        `iterator` in interface `java.lang.Iterable<org.apache.tools.ant.types.Resource>`
      Specified by:
        `iterator` in interface `org.apache.tools.ant.types.ResourceCollection`

    - #### isFilesystemOnly

          public boolean isFilesystemOnly()

      Specified by:
        `isFilesystemOnly` in interface `org.apache.tools.ant.types.ResourceCollection`
      Returns:
        false

    - #### setRefid

          public void setRefid(org.apache.tools.ant.types.Reference r)

      Overrides the base version.
      Overrides:
        `setRefid` in class `org.apache.tools.ant.types.DataType`
      Parameters:
        `r` - the Reference to set.

    - #### clone

          public java.lang.Object clone()

      Implement clone. The nested resource collections are cloned as well.
      Overrides:
        `clone` in class `org.apache.tools.ant.types.DataType`
      Returns:
        a cloned instance.

    - #### grabArchives

          protected java.util.Iterator grabArchives()

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

    - #### configureArchive

          protected org.apache.tools.ant.types.ArchiveFileSet configureArchive(org.apache.tools.ant.types.ArchiveFileSet afs,
                                                                               org.apache.tools.ant.types.Resource src)

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

    - #### dieOnCircularReference

          protected void dieOnCircularReference(java.util.Stack stk,
                                                org.apache.tools.ant.Project p)
                                         throws org.apache.tools.ant.BuildException

      Overrides the version of DataType to recurse on all DataType child elements that may have been added.
      Overrides:
        `dieOnCircularReference` in class `org.apache.tools.ant.types.DataType`
      Parameters:
        `stk` - the stack of data types to use (recursively).
        `p` - the project to use to dereference the references.
      Throws:
        `org.apache.tools.ant.BuildException` - on error.