org.apache.tools.ant.types.selectors

Class AbstractSelectorContainer

public abstract class AbstractSelectorContainer extends DataType implements SelectorContainer

This is the a base class a container of selectors - it does not need do be a selector itself.

Since: 1.7

Method Summary
voidadd(FileSelector selector)
add an arbitary selector
voidaddAnd(AndSelector selector)
add an "And" selector entry on the selector list
voidaddContains(ContainsSelector selector)
add a contains selector entry on the selector list
voidaddContainsRegexp(ContainsRegexpSelector selector)
add a regular expression selector entry on the selector list
voidaddCustom(ExtendSelector selector)
add an extended selector entry on the selector list
voidaddDate(DateSelector selector)
add a selector date entry on the selector list
voidaddDepend(DependSelector selector)
add a depends selector entry on the selector list
voidaddDepth(DepthSelector selector)
add a depth selector entry on the selector list
voidaddDifferent(DifferentSelector selector)
adds a different selector to the selector list
voidaddFilename(FilenameSelector selector)
add a selector filename entry on the selector list
voidaddMajority(MajoritySelector selector)
add a majority selector entry on the selector list
voidaddModified(ModifiedSelector selector)
add the modified selector
voidaddNone(NoneSelector selector)
add a "None" selector entry on the selector list
voidaddNot(NotSelector selector)
add a "Not" selector entry on the selector list
voidaddOr(OrSelector selector)
add an "Or" selector entry on the selector list
voidaddPresent(PresentSelector selector)
add a present selector entry on the selector list
voidaddSelector(SelectSelector selector)
add a "Select" selector entry on the selector list
voidaddSize(SizeSelector selector)
add a selector size entry on the selector list
voidaddType(TypeSelector selector)
adds a type selector to the selector list
voidappendSelector(FileSelector selector)
Add a new selector into this container.
FileSelector[]getSelectors(Project p)
Returns the set of selectors as an array.
booleanhasSelectors()
Indicates whether there are any selectors here.
intselectorCount()
Gives the count of the number of selectors in this container
EnumerationselectorElements()
Returns an enumerator for accessing the set of selectors.
StringtoString()
Convert the Selectors within this container to a string.
voidvalidate()

This validates each contained selector provided that the selector implements the validate interface.

Method Detail

add

public void add(FileSelector selector)
add an arbitary selector

Parameters: selector the selector to add

Since: Ant 1.6

addAnd

public void addAnd(AndSelector selector)
add an "And" selector entry on the selector list

Parameters: selector the selector to add

addContains

public void addContains(ContainsSelector selector)
add a contains selector entry on the selector list

Parameters: selector the selector to add

addContainsRegexp

public void addContainsRegexp(ContainsRegexpSelector selector)
add a regular expression selector entry on the selector list

Parameters: selector the selector to add

addCustom

public void addCustom(ExtendSelector selector)
add an extended selector entry on the selector list

Parameters: selector the selector to add

addDate

public void addDate(DateSelector selector)
add a selector date entry on the selector list

Parameters: selector the selector to add

addDepend

public void addDepend(DependSelector selector)
add a depends selector entry on the selector list

Parameters: selector the selector to add

addDepth

public void addDepth(DepthSelector selector)
add a depth selector entry on the selector list

Parameters: selector the selector to add

addDifferent

public void addDifferent(DifferentSelector selector)
adds a different selector to the selector list

Parameters: selector the selector to add

addFilename

public void addFilename(FilenameSelector selector)
add a selector filename entry on the selector list

Parameters: selector the selector to add

addMajority

public void addMajority(MajoritySelector selector)
add a majority selector entry on the selector list

Parameters: selector the selector to add

addModified

public void addModified(ModifiedSelector selector)
add the modified selector

Parameters: selector the selector to add

Since: ant 1.6

addNone

public void addNone(NoneSelector selector)
add a "None" selector entry on the selector list

Parameters: selector the selector to add

addNot

public void addNot(NotSelector selector)
add a "Not" selector entry on the selector list

Parameters: selector the selector to add

addOr

public void addOr(OrSelector selector)
add an "Or" selector entry on the selector list

Parameters: selector the selector to add

addPresent

public void addPresent(PresentSelector selector)
add a present selector entry on the selector list

Parameters: selector the selector to add

addSelector

public void addSelector(SelectSelector selector)
add a "Select" selector entry on the selector list

Parameters: selector the selector to add

addSize

public void addSize(SizeSelector selector)
add a selector size entry on the selector list

Parameters: selector the selector to add

addType

public void addType(TypeSelector selector)
adds a type selector to the selector list

Parameters: selector the selector to add

appendSelector

public void appendSelector(FileSelector selector)
Add a new selector into this container.

Parameters: selector the new selector to add

getSelectors

public FileSelector[] getSelectors(Project p)
Returns the set of selectors as an array.

Parameters: p the current project

Returns: an array of selectors

hasSelectors

public boolean hasSelectors()
Indicates whether there are any selectors here.

Returns: true if there are selectors

selectorCount

public int selectorCount()
Gives the count of the number of selectors in this container

Returns: the number of selectors

selectorElements

public Enumeration selectorElements()
Returns an enumerator for accessing the set of selectors.

Returns: an enumerator for the selectors

toString

public String toString()
Convert the Selectors within this container to a string. This will just be a helper class for the subclasses that put their own name around the contents listed here.

Returns: comma separated list of Selectors contained in this one

validate

public void validate()

This 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:

Copyright