|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.ProjectComponent | +--org.apache.tools.ant.types.DataType | +--org.apache.tools.ant.types.AbstractFileSet
Class that holds an implicit patternset and supports nested patternsets and creates a DirectoryScanner using these patterns.
Common base class for DirSet and FileSet.
Field Summary |
Fields inherited from class org.apache.tools.ant.types.DataType |
checked, description, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
|
AbstractFileSet()
|
protected |
AbstractFileSet(AbstractFileSet fileset)
|
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 |
appendSelector(FileSelector selector)
Add a new selector into this container. |
java.lang.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 on the exclude list |
PatternSet.NameEntry |
createExcludesFile()
add a name entry on the excludes files list |
PatternSet.NameEntry |
createInclude()
add a name entry on the include list |
PatternSet.NameEntry |
createIncludesFile()
add a name entry on the include files list |
PatternSet |
createPatternSet()
Creates a nested patternset. |
protected java.lang.String |
getDataTypeName()
sets the name used for this datatype instance. |
java.io.File |
getDir(Project p)
Retrieves the base-directory for this instance. |
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 |
isFollowSymlinks()
find out if the fileset wants to follow symbolic links |
int |
selectorCount()
Gives the count of the number of selectors in this container |
java.util.Enumeration |
selectorElements()
Returns an enumerator for accessing the set of selectors. |
void |
setCaseSensitive(boolean isCaseSensitive)
Sets case sensitivity of the file system |
void |
setDefaultexcludes(boolean useDefaultExcludes)
Sets whether default exclusions should be used or not. |
void |
setDir(java.io.File dir)
Sets the base-directory for this instance. |
void |
setExcludes(java.lang.String excludes)
Appends excludes to the current list of exclude
patterns. |
void |
setExcludesfile(java.io.File excl)
Sets the name of the file containing the excludes patterns. |
void |
setFile(java.io.File file)
Creates a single file fileset. |
void |
setFollowSymlinks(boolean followSymlinks)
Sets whether or not symbolic links should be followed. |
void |
setIncludes(java.lang.String includes)
Appends includes to the current list of include
patterns. |
void |
setIncludesfile(java.io.File incl)
Sets the name of the file containing the includes patterns. |
void |
setRefid(Reference r)
Makes this instance in effect a reference to another instance. |
void |
setupDirectoryScanner(FileScanner ds,
Project p)
|
java.lang.String |
toString()
Returns included files as a list of semicolon-separated filenames |
Methods inherited from class org.apache.tools.ant.types.DataType |
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public AbstractFileSet()
protected AbstractFileSet(AbstractFileSet fileset)
Method Detail |
public void setRefid(Reference r) throws BuildException
You must not set another attribute or nest elements inside this element if you make it a reference.
setRefid
in class DataType
BuildException
public void setDir(java.io.File dir) throws BuildException
BuildException
public java.io.File getDir(Project p)
public PatternSet createPatternSet()
public PatternSet.NameEntry createInclude()
public PatternSet.NameEntry createIncludesFile()
public PatternSet.NameEntry createExclude()
public PatternSet.NameEntry createExcludesFile()
public void setFile(java.io.File file)
public void setIncludes(java.lang.String includes)
includes
to the current list of include
patterns.
Patterns may be separated by a comma or a space.
includes
- the string containing the include patternspublic void setExcludes(java.lang.String excludes)
excludes
to the current list of exclude
patterns.
Patterns may be separated by a comma or a space.
excludes
- the string containing the exclude patternspublic void setIncludesfile(java.io.File incl) throws BuildException
incl
- The file to fetch the include patterns from.
BuildException
public void setExcludesfile(java.io.File excl) throws BuildException
excl
- The file to fetch the exclude patterns from.
BuildException
public void setDefaultexcludes(boolean useDefaultExcludes)
useDefaultExcludes
- "true"|"on"|"yes" when default exclusions
should be used, "false"|"off"|"no" when they
shouldn't be used.public void setCaseSensitive(boolean isCaseSensitive)
isCaseSensitive
- "true"|"on"|"yes" if file system is case
sensitive, "false"|"off"|"no" when not.public void setFollowSymlinks(boolean followSymlinks)
followSymlinks
- whether or not symbolic links should be followedpublic boolean isFollowSymlinks()
protected java.lang.String getDataTypeName()
public DirectoryScanner getDirectoryScanner(Project p)
public void setupDirectoryScanner(FileScanner ds, Project p)
protected AbstractFileSet getRef(Project p)
public boolean hasSelectors()
hasSelectors
in interface SelectorContainer
public boolean hasPatterns()
public int selectorCount()
selectorCount
in interface SelectorContainer
public FileSelector[] getSelectors(Project p)
getSelectors
in interface SelectorContainer
p
- the current project
public java.util.Enumeration selectorElements()
selectorElements
in interface SelectorContainer
public void appendSelector(FileSelector selector)
appendSelector
in interface SelectorContainer
selector
- the new selector to addpublic void addSelector(SelectSelector selector)
addSelector
in interface SelectorContainer
selector
- the selector to addpublic void addAnd(AndSelector selector)
addAnd
in interface SelectorContainer
selector
- the selector to addpublic void addOr(OrSelector selector)
addOr
in interface SelectorContainer
selector
- the selector to addpublic void addNot(NotSelector selector)
addNot
in interface SelectorContainer
selector
- the selector to addpublic void addNone(NoneSelector selector)
addNone
in interface SelectorContainer
selector
- the selector to addpublic void addMajority(MajoritySelector selector)
addMajority
in interface SelectorContainer
selector
- the selector to addpublic void addDate(DateSelector selector)
addDate
in interface SelectorContainer
selector
- the selector to addpublic void addSize(SizeSelector selector)
addSize
in interface SelectorContainer
selector
- the selector to addpublic void addDifferent(DifferentSelector selector)
addDifferent
in interface SelectorContainer
selector
- the selector to addpublic void addFilename(FilenameSelector selector)
addFilename
in interface SelectorContainer
selector
- the selector to addpublic void addType(TypeSelector selector)
addType
in interface SelectorContainer
selector
- the selector to addpublic void addCustom(ExtendSelector selector)
addCustom
in interface SelectorContainer
selector
- the selector to addpublic void addContains(ContainsSelector selector)
addContains
in interface SelectorContainer
selector
- the selector to addpublic void addPresent(PresentSelector selector)
addPresent
in interface SelectorContainer
selector
- the selector to addpublic void addDepth(DepthSelector selector)
addDepth
in interface SelectorContainer
selector
- the selector to addpublic void addDepend(DependSelector selector)
addDepend
in interface SelectorContainer
selector
- the selector to addpublic void addContainsRegexp(ContainsRegexpSelector selector)
addContainsRegexp
in interface SelectorContainer
selector
- the selector to addpublic void addModified(ModifiedSelector selector)
addModified
in interface SelectorContainer
selector
- the selector to addpublic void add(FileSelector selector)
add
in interface SelectorContainer
selector
- the selector to addpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone()
clone
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |