|
||||||||||
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.Task | +--org.apache.tools.ant.taskdefs.MatchingTask
This is an abstract task that should be used by all those tasks that require to include or exclude files based on pattern matching.
Field Summary | |
protected FileSet |
fileset
|
Fields inherited from class org.apache.tools.ant.Task |
description, location, target, taskName, taskType, wrapper |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Constructor Summary | |
MatchingTask()
|
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 type selector entry on the type 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 type selector entry on the type list |
void |
appendSelector(FileSelector selector)
Add a new selector into this container. |
PatternSet.NameEntry |
createExclude()
add a name entry on the exclude list |
PatternSet.NameEntry |
createExcludesFile()
add a name entry on the include 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()
add a set of patterns |
protected DirectoryScanner |
getDirectoryScanner(java.io.File baseDir)
Returns the directory scanner needed to access the files to process. |
protected FileSet |
getImplicitFileSet()
Accessor for the implicit fileset. |
FileSelector[] |
getSelectors(Project p)
Returns the set of selectors as an array. |
boolean |
hasSelectors()
Indicates whether there are any selectors here. |
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 |
setExcludes(java.lang.String excludes)
Sets the set of exclude patterns. |
void |
setExcludesfile(java.io.File excludesfile)
Sets the name of the file containing the includes patterns. |
void |
setFollowSymlinks(boolean followSymlinks)
Sets whether or not symbolic links should be followed. |
void |
setIncludes(java.lang.String includes)
Sets the set of include patterns. |
void |
setIncludesfile(java.io.File includesfile)
Sets the name of the file containing the includes patterns. |
void |
setProject(Project project)
Sets the project object of this component. |
void |
XsetIgnore(java.lang.String ignoreString)
List of filenames and directory names to not include. |
void |
XsetItems(java.lang.String itemString)
Set this to be the items in the base directory that you want to be included. |
Methods inherited from class org.apache.tools.ant.Task |
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected FileSet fileset
Constructor Detail |
public MatchingTask()
Method Detail |
public void setProject(Project project)
ProjectComponent
setProject
in class ProjectComponent
project
- Project in whose scope this component belongs.
Must not be null
.ProjectComponent.setProject(org.apache.tools.ant.Project)
public PatternSet.NameEntry createInclude()
public PatternSet.NameEntry createIncludesFile()
public PatternSet.NameEntry createExclude()
public PatternSet.NameEntry createExcludesFile()
public PatternSet createPatternSet()
public void setIncludes(java.lang.String includes)
includes
- the string containing the include patternspublic void XsetItems(java.lang.String itemString)
itemString
- the string containing the files to include.public void setExcludes(java.lang.String excludes)
excludes
- the string containing the exclude patternspublic void XsetIgnore(java.lang.String ignoreString)
ignoreString
- the string containing the files to ignore.public void setDefaultexcludes(boolean useDefaultExcludes)
useDefaultExcludes
- "true"|"on"|"yes" when default exclusions
should be used, "false"|"off"|"no" when they
shouldn't be used.protected DirectoryScanner getDirectoryScanner(java.io.File baseDir)
public void setIncludesfile(java.io.File includesfile)
includesfile
- A string containing the filename to fetch
the include patterns from.public void setExcludesfile(java.io.File excludesfile)
excludesfile
- A string containing the filename to fetch
the include patterns from.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 hasSelectors()
hasSelectors
in interface SelectorContainer
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 addFilename(FilenameSelector selector)
addFilename
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 addDifferent(DifferentSelector selector)
addDifferent
in interface SelectorContainer
selector
- the selector to addpublic void addType(TypeSelector selector)
addType
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 addprotected final FileSet getImplicitFileSet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |