Class MultiRootFileSet

All Implemented Interfaces:
Cloneable, Iterable<Resource>, ResourceCollection, SelectorContainer

public class MultiRootFileSet extends AbstractFileSet implements ResourceCollection
Union of file/dirsets that share the same patterns and selectors but have different roots.
Since:
Ant 1.9.4
  • Constructor Details

    • MultiRootFileSet

      public MultiRootFileSet()
  • Method Details

    • setDir

      public void setDir(File dir)
      Description copied from class: AbstractFileSet
      Sets the base-directory for this instance.
      Overrides:
      setDir in class AbstractFileSet
      Parameters:
      dir - the directory's File instance.
    • setType

      public void setType(MultiRootFileSet.SetType type)
      Determines the types of resources to return.
      Parameters:
      type - the types of resources to return
    • setCache

      public void setCache(boolean b)
      Set whether to cache collections.
      Parameters:
      b - boolean cache flag.
    • setBaseDirs

      public void setBaseDirs(String dirs)
      Adds basedirs as a comma separated list.
      Parameters:
      dirs - directories as CSV
    • addConfiguredBaseDir

      public void addConfiguredBaseDir(FileResource r)
      Adds a basedir as nested element.
      Parameters:
      r - basedir
    • setRefid

      public void setRefid(Reference r)
      Description copied from class: AbstractFileSet
      Makes this instance in effect a reference to another instance.

      You must not set another attribute or nest elements inside this element if you make it a reference.

      Overrides:
      setRefid in class AbstractFileSet
      Parameters:
      r - the Reference to use.
    • clone

      public Object clone()
      Return a MultiRootFileSet that has the same basedirs and same patternsets as this one.
      Overrides:
      clone in class AbstractFileSet
      Returns:
      the cloned MultiRootFileSet.
    • iterator

      public Iterator<Resource> iterator()
      Fulfill the ResourceCollection contract.
      Specified by:
      iterator in interface Iterable<Resource>
      Returns:
      an Iterator of Resources.
    • size

      public int size()
      Fulfill the ResourceCollection contract.
      Specified by:
      size in interface ResourceCollection
      Returns:
      number of elements as int.
    • isFilesystemOnly

      public boolean isFilesystemOnly()
      Always returns true.
      Specified by:
      isFilesystemOnly in interface ResourceCollection
      Returns:
      true indicating that all elements will be FileResources.
    • toString

      public String toString()
      Returns included directories as a list of semicolon-separated paths.
      Overrides:
      toString in class AbstractFileSet
      Returns:
      a String of included directories.