|
BaseSelectorContainer (Apache Ant API)
org.apache.tools.ant.types.selectors
|
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 | |
BaseSelectorContainer()
Default constructor. |
Method Summary | |
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 |
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 |
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 |
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 |
appendSelector(FileSelector selector)
Add a new selector into this container. |
FileSelector[] |
getSelectors(Project p)
Returns the set of selectors as an array. |
boolean |
hasSelectors()
Indicates whether there are any selectors here. |
abstract boolean |
isSelected(java.io.File basedir,
java.lang.String filename,
java.io.File file)
Method that each selector will implement to create their selection behaviour. |
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. |
java.lang.String |
toString()
Convert the Selectors within this container to a string. |
void |
validate()
This implementation validates the container by calling verifySettings() and then validates each contained selector provided that the selector implements the validate interface. |
Methods inherited from class org.apache.tools.ant.types.selectors.BaseSelector |
getError, setError, verifySettings |
Methods inherited from class org.apache.tools.ant.types.DataType |
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, setDescription, setRefid, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public BaseSelectorContainer()
Method Detail |
public boolean hasSelectors()
hasSelectors
in interface SelectorContainer
public int selectorCount()
selectorCount
in interface SelectorContainer
public FileSelector[] getSelectors(Project p)
getSelectors
in interface SelectorContainer
public java.util.Enumeration selectorElements()
selectorElements
in interface SelectorContainer
public java.lang.String toString()
toString
in class java.lang.Object
public void appendSelector(FileSelector selector)
appendSelector
in interface SelectorContainer
selector
- the new selector to add
public void validate()
This implementation validates the container by calling verifySettings() and then validates each contained selector provided that the selector implements the validate interface.
Ordinarily, this will validate all the elements of a selector container even if the isSelected() method of some elements is never called. This has two effects:
validate
in class BaseSelector
public abstract boolean isSelected(java.io.File basedir, java.lang.String filename, java.io.File file)
isSelected
in interface FileSelector
isSelected
in class BaseSelector
basedir
- the base directory the scan is being done fromfilename
- the name of the file to checkfile
- a java.io.File object for the filename that the selector
can use
public void addSelector(SelectSelector selector)
addSelector
in interface SelectorContainer
public void addAnd(AndSelector selector)
addAnd
in interface SelectorContainer
public void addOr(OrSelector selector)
addOr
in interface SelectorContainer
public void addNot(NotSelector selector)
addNot
in interface SelectorContainer
public void addNone(NoneSelector selector)
addNone
in interface SelectorContainer
public void addMajority(MajoritySelector selector)
addMajority
in interface SelectorContainer
public void addDate(DateSelector selector)
addDate
in interface SelectorContainer
public void addSize(SizeSelector selector)
addSize
in interface SelectorContainer
public void addFilename(FilenameSelector selector)
addFilename
in interface SelectorContainer
public void addCustom(ExtendSelector selector)
addCustom
in interface SelectorContainer
public void addContains(ContainsSelector selector)
addContains
in interface SelectorContainer
public void addPresent(PresentSelector selector)
addPresent
in interface SelectorContainer
public void addDepth(DepthSelector selector)
addDepth
in interface SelectorContainer
public void addDepend(DependSelector selector)
addDepend
in interface SelectorContainer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |