org.apache.tools.ant.types

Class FileSet

Implemented Interfaces:
Cloneable, ResourceCollection, SelectorContainer
Known Direct Subclasses:
ArchiveFileSet, BCFileSet, ClassfileSet, Gjdoc.TagArgument, Javadoc.TagArgument, LibFileSet

public class FileSet
extends AbstractFileSet
implements ResourceCollection

Moved out of MatchingTask to make it a standalone object that could be referenced (by scripts for example).

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

FileSet()
Constructor for FileSet.
FileSet(FileSet fileset)
Constructor for FileSet, with FileSet to shallowly clone.

Method Summary

Object
clone()
Return a FileSet that has the same basedir and same patternsets as this one.
boolean
isFilesystemOnly()
Always returns true.
Iterator
iterator()
Fulfill the ResourceCollection contract.
int
size()
Fulfill the ResourceCollection contract.

Methods inherited from class org.apache.tools.ant.types.AbstractFileSet

add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendExcludes, appendIncludes, appendSelector, clone, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getDirectoryScanner, getRef, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setRefid, setupDirectoryScanner, setupDirectoryScanner, toString

Methods inherited from class org.apache.tools.ant.types.DataType

checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, setChecked, setRefid, toString, tooManyAttributes

Methods inherited from class org.apache.tools.ant.ProjectComponent

clone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject

Constructor Details

FileSet

public FileSet()
Constructor for FileSet.

FileSet

protected FileSet(FileSet fileset)
Constructor for FileSet, with FileSet to shallowly clone.
Parameters:
fileset - the fileset to clone

Method Details

clone

public Object clone()
Return a FileSet that has the same basedir and same patternsets as this one.
Overrides:
clone in interface AbstractFileSet
Returns:
the cloned fileset

isFilesystemOnly

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

iterator

public Iterator iterator()
Fulfill the ResourceCollection contract.
Specified by:
iterator in interface ResourceCollection
Returns:
an Iterator of Resources.
Since:
Ant 1.7

size

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