Class MultiRootFileSet
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.AbstractFileSet
org.apache.tools.ant.types.resources.MultiRootFileSet
- All Implemented Interfaces:
java.lang.Cloneable,java.lang.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
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultiRootFileSet.SetTypeWhat to return from the set: files, directories or both. -
Field Summary
-
Constructor Summary
Constructors Constructor Description MultiRootFileSet() -
Method Summary
Modifier and Type Method Description voidaddConfiguredBaseDir(FileResource r)Adds a basedir as nested element.java.lang.Objectclone()Return a MultiRootFileSet that has the same basedirs and same patternsets as this one.booleanisFilesystemOnly()Always returns true.java.util.Iterator<Resource>iterator()Fulfill the ResourceCollection contract.voidsetBaseDirs(java.lang.String dirs)Adds basedirs as a comma separated list.voidsetCache(boolean b)Set whether to cache collections.voidsetDir(java.io.File dir)Sets the base-directory for this instance.voidsetRefid(Reference r)Makes this instance in effect a reference to another instance.voidsetType(MultiRootFileSet.SetType type)Determines the types of resources to return.intsize()Fulfill the ResourceCollection contract.java.lang.StringtoString()Returns included directories as a list of semicolon-separated paths.Methods inherited from class org.apache.tools.ant.types.AbstractFileSet
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addExecutable, addFilename, addMajority, addModified, addNone, addNot, addOr, addOwnedBy, addPosixGroup, addPosixPermissions, addPresent, addReadable, addSelector, addSize, addSymlink, addType, addWritable, appendExcludes, appendIncludes, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, dieOnCircularReference, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getDirectoryScanner, getErrorOnMissingDir, getMaxLevelsOfSymlinks, getRef, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setupDirectoryScanner, setupDirectoryScannerMethods 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, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
MultiRootFileSet
public MultiRootFileSet()
-
-
Method Details
-
setDir
public void setDir(java.io.File dir)Description copied from class:AbstractFileSetSets the base-directory for this instance.- Overrides:
setDirin classAbstractFileSet- Parameters:
dir- the directory'sFileinstance.
-
setType
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(java.lang.String dirs)Adds basedirs as a comma separated list.- Parameters:
dirs- directories as CSV
-
addConfiguredBaseDir
Adds a basedir as nested element.- Parameters:
r- basedir
-
setRefid
Description copied from class:AbstractFileSetMakes 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:
setRefidin classAbstractFileSet- Parameters:
r- theReferenceto use.
-
clone
public java.lang.Object clone()Return a MultiRootFileSet that has the same basedirs and same patternsets as this one.- Overrides:
clonein classAbstractFileSet- Returns:
- the cloned MultiRootFileSet.
-
iterator
Fulfill the ResourceCollection contract.- Specified by:
iteratorin interfacejava.lang.Iterable<Resource>- Returns:
- an Iterator of Resources.
-
size
public int size()Fulfill the ResourceCollection contract.- Specified by:
sizein interfaceResourceCollection- Returns:
- number of elements as int.
-
isFilesystemOnly
public boolean isFilesystemOnly()Always returns true.- Specified by:
isFilesystemOnlyin interfaceResourceCollection- Returns:
- true indicating that all elements will be FileResources.
-
toString
public java.lang.String toString()Returns included directories as a list of semicolon-separated paths.- Overrides:
toStringin classAbstractFileSet- Returns:
- a
Stringof included directories.
-