org.apache.tools.ant.types
public abstract class AbstractFileSet extends DataType implements Cloneable, SelectorContainer
Common base class for DirSet and FileSet.
Constructor Summary | |
---|---|
AbstractFileSet()
Construct a new AbstractFileSet . | |
protected | AbstractFileSet(AbstractFileSet fileset)
Construct a new AbstractFileSet , shallowly cloned
from the specified AbstractFileSet . |
Method Summary | |
---|---|
void | add(FileSelector selector)
Add an arbitary selector. |
void | addAnd(AndSelector selector)
Add an "And" selector entry on the selector list. |
void | addContains(ContainsSelector selector)
Add a contains selector entry on the selector list. |
void | addContainsRegexp(ContainsRegexpSelector selector)
Add a regular expression selector entry on the selector list. |
void | addCustom(ExtendSelector selector)
Add an extended selector entry on the selector list. |
void | addDate(DateSelector selector)
Add a selector date entry on the selector list. |
void | addDepend(DependSelector selector)
Add a depends selector entry on the selector list. |
void | addDepth(DepthSelector selector)
Add a depth selector entry on the selector list. |
void | addDifferent(DifferentSelector selector)
Add a DifferentSelector entry on the selector list. |
void | addFilename(FilenameSelector selector)
Add a selector filename entry on the selector list. |
void | addMajority(MajoritySelector selector)
Add a majority selector entry on the selector list. |
void | addModified(ModifiedSelector selector)
Add the modified selector. |
void | addNone(NoneSelector selector)
Add a "None" selector entry on the selector list. |
void | addNot(NotSelector selector)
Add a "Not" selector entry on the selector list. |
void | addOr(OrSelector selector)
Add an "Or" selector entry on the selector list. |
void | addPresent(PresentSelector selector)
Add a present selector entry on the selector list. |
void | addSelector(SelectSelector selector)
Add a "Select" selector entry on the selector list. |
void | addSize(SizeSelector selector)
Add a selector size entry on the selector list. |
void | addType(TypeSelector selector)
Add a selector type entry on the selector list. |
void | appendExcludes(String[] excludes)
Appends excludes to the current list of include
patterns.
|
void | appendIncludes(String[] includes)
Appends includes to the current list of include
patterns.
|
void | appendSelector(FileSelector selector)
Add a new selector into this container.
|
Object | clone()
Creates a deep clone of this instance, except for the nested
selectors (the list of selectors is a shallow clone of this
instance's list). |
PatternSet.NameEntry | createExclude()
Add a name entry to the exclude list. |
PatternSet.NameEntry | createExcludesFile()
Add a name entry to the excludes files list. |
PatternSet.NameEntry | createInclude()
Add a name entry to the include list. |
PatternSet.NameEntry | createIncludesFile()
Add a name entry to the include files list. |
PatternSet | createPatternSet()
Creates a nested patternset. |
boolean | getDefaultexcludes()
Whether default exclusions should be used or not. |
File | getDir()
Retrieves the base-directory for this instance. |
File | getDir(Project p)
Retrieves the base-directory for this instance. |
DirectoryScanner | getDirectoryScanner()
Returns the directory scanner needed to access the files to process. |
DirectoryScanner | getDirectoryScanner(Project p)
Returns the directory scanner needed to access the files to process. |
protected AbstractFileSet | getRef(Project p)
Performs the check for circular references and returns the
referenced FileSet. |
FileSelector[] | getSelectors(Project p)
Returns the set of selectors as an array. |
boolean | hasPatterns()
Indicates whether there are any patterns here.
|
boolean | hasSelectors()
Indicates whether there are any selectors here.
|
boolean | isCaseSensitive()
Find out if the fileset is case sensitive.
|
boolean | isFollowSymlinks()
Find out if the fileset wants to follow symbolic links.
|
String[] | mergeExcludes(Project p)
Get the merged exclude patterns for this AbstractFileSet. |
String[] | mergeIncludes(Project p)
Get the merged include patterns for this AbstractFileSet. |
PatternSet | mergePatterns(Project p)
Get the merged patterns for this AbstractFileSet. |
int | selectorCount()
Gives the count of the number of selectors in this container.
|
Enumeration | selectorElements()
Returns an enumerator for accessing the set of selectors.
|
void | setCaseSensitive(boolean caseSensitive)
Sets case sensitivity of the file system.
|
void | setDefaultexcludes(boolean useDefaultExcludes)
Sets whether default exclusions should be used or not.
|
void | setDir(File dir)
Sets the base-directory for this instance. |
void | setExcludes(String excludes)
Appends excludes to the current list of exclude
patterns.
|
void | setExcludesfile(File excl)
Sets the File containing the excludes patterns.
|
void | setFile(File file)
Creates a single file fileset. |
void | setFollowSymlinks(boolean followSymlinks)
Sets whether or not symbolic links should be followed.
|
void | setIncludes(String includes)
Appends includes to the current list of include
patterns.
|
void | setIncludesfile(File incl)
Sets the File containing the includes patterns.
|
void | setRefid(Reference r)
Makes this instance in effect a reference to another instance.
|
void | setupDirectoryScanner(FileScanner ds)
Set up the specified directory scanner against this
AbstractFileSet's Project. |
void | setupDirectoryScanner(FileScanner ds, Project p)
Set up the specified directory scanner against the specified project. |
String | toString()
Returns included files as a list of semicolon-separated filenames.
|
AbstractFileSet
.AbstractFileSet
, shallowly cloned
from the specified AbstractFileSet
.Parameters: fileset the AbstractFileSet
to use as a template.
Parameters: selector the FileSelector
to add.
Since: Ant 1.6
Parameters: selector the AndSelector
to add.
Parameters: selector the ContainsSelector
to add.
Parameters: selector the ContainsRegexpSelector
to add.
Parameters: selector the ExtendSelector
to add.
Parameters: selector the DateSelector
to add.
Parameters: selector the DependSelector
to add.
Parameters: selector the DepthSelector
to add.
Parameters: selector the DifferentSelector
to add.
Parameters: selector the FilenameSelector
to add.
Parameters: selector the MajoritySelector
to add.
Parameters: selector the ModifiedSelector
to add.
Since: ant 1.6
Parameters: selector the NoneSelector
to add.
Parameters: selector the NotSelector
to add.
Parameters: selector the OrSelector
to add.
Parameters: selector the PresentSelector
to add.
Parameters: selector the SelectSelector
to add.
Parameters: selector the SizeSelector
to add.
Parameters: selector the TypeSelector
to add.
excludes
to the current list of include
patterns.
Parameters: excludes array containing the exclude patterns.
Since: Ant 1.7
includes
to the current list of include
patterns.
Parameters: includes array containing the include patterns.
Since: Ant 1.7
Parameters: selector the new FileSelector
to add.
Returns: the cloned object
Since: Ant 1.6
Returns: PatternSet.NameEntry
.
Returns: PatternSet.NameEntry
.
Returns: PatternSet.NameEntry
.
Returns: PatternSet.NameEntry
.
Returns: PatternSet
.
Returns: the default exclusions value.
Since: Ant 1.6.3
Returns: File
.
Parameters: p the Project
against which the
reference is resolved, if set.
Returns: File
.
Returns: a DirectoryScanner
instance.
Parameters: p the Project against which the DirectoryScanner should be configured.
Returns: a DirectoryScanner
instance.
Parameters: p the current project
Returns: the referenced FileSet
Parameters: p the current project
Returns: a FileSelector[]
of the selectors in this container.
Returns: whether any patterns are in this container.
Returns: whether any selectors are in this container.
Returns: boolean
indicating whether the fileset is
case sensitive.
Since: Ant 1.7
Returns: boolean
indicating whether symbolic links
should be followed.
Since: Ant 1.6
Parameters: p the project to use.
Returns: the exclude patterns of the default pattern set and all nested patternsets.
Since: Ant 1.7
Parameters: p the project to use.
Returns: the include patterns of the default pattern set and all nested patternsets.
Since: Ant 1.7
Parameters: p the project to use.
Returns: the default patternset merged with the additional sets in a new PatternSet instance.
Since: Ant 1.7
Returns: the number of selectors in this container as an int
.
Returns: an Enumeration
of selectors.
Parameters: caseSensitive boolean
.
Parameters: useDefaultExcludes boolean
.
Parameters: dir the directory's File
instance.
Throws: BuildException on error
excludes
to the current list of exclude
patterns.
Patterns may be separated by a comma or a space.
Parameters: excludes the String
containing the exclude patterns.
File
containing the excludes patterns.
Parameters: excl File
instance.
Throws: BuildException on error
Parameters: file the single File
included in this
AbstractFileSet
.
Parameters: followSymlinks whether or not symbolic links should be followed.
includes
to the current list of include
patterns.
Patterns may be separated by a comma or a space.
Parameters: includes the String
containing the include patterns.
File
containing the includes patterns.
Parameters: incl File
instance.
Throws: BuildException on error
You must not set another attribute or nest elements inside this element if you make it a reference.
Parameters: r the Reference
to use.
Throws: BuildException on error
Parameters: ds a FileScanner
instance.
Parameters: ds a FileScanner
instance. p an Ant Project
instance.
Returns: a String
of included filenames.