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:
Cloneable
,Iterable<Resource>
,ResourceCollection
,SelectorContainer
Union of file/dirsets that share the same patterns and selectors
but have different roots.
- Since:
- Ant 1.9.4
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
What to return from the set: files, directories or both. -
Field Summary
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a basedir as nested element.clone()
Return a MultiRootFileSet that has the same basedirs and same patternsets as this one.boolean
Always returns true.iterator()
Fulfill the ResourceCollection contract.void
setBaseDirs
(String dirs) Adds basedirs as a comma separated list.void
setCache
(boolean b) Set whether to cache collections.void
Sets the base-directory for this instance.void
Makes this instance in effect a reference to another instance.void
Determines the types of resources to return.int
size()
Fulfill the ResourceCollection contract.toString()
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, setupDirectoryScanner
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
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
-
MultiRootFileSet
public MultiRootFileSet()
-
-
Method Details
-
setDir
Description copied from class:AbstractFileSet
Sets the base-directory for this instance.- Overrides:
setDir
in classAbstractFileSet
- Parameters:
dir
- the directory'sFile
instance.
-
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
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: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 classAbstractFileSet
- Parameters:
r
- theReference
to use.
-
clone
Return a MultiRootFileSet that has the same basedirs and same patternsets as this one.- Overrides:
clone
in classAbstractFileSet
- Returns:
- the cloned MultiRootFileSet.
-
iterator
-
size
public int size()Fulfill the ResourceCollection contract.- Specified by:
size
in interfaceResourceCollection
- Returns:
- number of elements as int.
-
isFilesystemOnly
public boolean isFilesystemOnly()Always returns true.- Specified by:
isFilesystemOnly
in interfaceResourceCollection
- Returns:
- true indicating that all elements will be FileResources.
-
toString
Returns included directories as a list of semicolon-separated paths.- Overrides:
toString
in classAbstractFileSet
- Returns:
- a
String
of included directories.
-