java.lang.Cloneable, ResourceSelector, FileSelector, SelectorContainerAndSelector, MajoritySelector, NoneSelector, OrSelector, SelectSelectorpublic abstract class BaseSelectorContainer extends BaseSelector implements SelectorContainer
description, location, project| Constructor | Description |
|---|---|
BaseSelectorContainer() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
add(FileSelector selector) |
add an arbitrary 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) |
adds a different selector to the selector list
|
void |
addExecutable(ExecutableSelector e) |
|
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 |
addOwnedBy(OwnedBySelector o) |
|
void |
addPosixGroup(PosixGroupSelector o) |
|
void |
addPosixPermissions(PosixPermissionsSelector o) |
|
void |
addPresent(PresentSelector selector) |
add a present selector entry on the selector list
|
void |
addReadable(ReadableSelector r) |
|
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 |
addSymlink(SymlinkSelector e) |
|
void |
addType(TypeSelector selector) |
adds a type selector to the selector list
|
void |
addWritable(WritableSelector w) |
|
void |
appendSelector(FileSelector selector) |
Add a new selector into this container.
|
protected void |
dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p) |
Check to see whether any DataType we hold references to is
included in the Stack (which holds all DataType instances that
directly or indirectly reference this instance, including this
instance itself).
|
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<FileSelector> |
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.
|
getCheckedRef, getError, setError, setError, verifySettingscheckAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributesisSelectedequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectpublic boolean hasSelectors()
hasSelectors in interface SelectorContainerpublic int selectorCount()
selectorCount in interface SelectorContainerpublic FileSelector[] getSelectors(Project p)
getSelectors in interface SelectorContainerp - the current projectpublic java.util.Enumeration<FileSelector> selectorElements()
selectorElements in interface SelectorContainerpublic java.lang.String toString()
public void appendSelector(FileSelector selector)
appendSelector in interface SelectorContainerselector - the new selector to addpublic 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 BaseSelectorpublic abstract boolean isSelected(java.io.File basedir,
java.lang.String filename,
java.io.File file)
isSelected in interface FileSelectorisSelected in class BaseSelectorbasedir - 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 usepublic void addSelector(SelectSelector selector)
addSelector in interface SelectorContainerselector - the selector to addpublic void addAnd(AndSelector selector)
addAnd in interface SelectorContainerselector - the selector to addpublic void addOr(OrSelector selector)
addOr in interface SelectorContainerselector - the selector to addpublic void addNot(NotSelector selector)
addNot in interface SelectorContainerselector - the selector to addpublic void addNone(NoneSelector selector)
addNone in interface SelectorContainerselector - the selector to addpublic void addMajority(MajoritySelector selector)
addMajority in interface SelectorContainerselector - the selector to addpublic void addDate(DateSelector selector)
addDate in interface SelectorContainerselector - the selector to addpublic void addSize(SizeSelector selector)
addSize in interface SelectorContainerselector - the selector to addpublic void addFilename(FilenameSelector selector)
addFilename in interface SelectorContainerselector - the selector to addpublic void addCustom(ExtendSelector selector)
addCustom in interface SelectorContainerselector - the selector to addpublic void addContains(ContainsSelector selector)
addContains in interface SelectorContainerselector - the selector to addpublic void addPresent(PresentSelector selector)
addPresent in interface SelectorContainerselector - the selector to addpublic void addDepth(DepthSelector selector)
addDepth in interface SelectorContainerselector - the selector to addpublic void addDepend(DependSelector selector)
addDepend in interface SelectorContainerselector - the selector to addpublic void addDifferent(DifferentSelector selector)
addDifferent in interface SelectorContainerselector - the selector to addpublic void addType(TypeSelector selector)
addType in interface SelectorContainerselector - the selector to addpublic void addContainsRegexp(ContainsRegexpSelector selector)
addContainsRegexp in interface SelectorContainerselector - the selector to addpublic void addModified(ModifiedSelector selector)
addModified in interface SelectorContainerselector - the selector to addpublic void addReadable(ReadableSelector r)
public void addWritable(WritableSelector w)
public void addExecutable(ExecutableSelector e)
e - ExecutableSelectorpublic void addSymlink(SymlinkSelector e)
e - SymlinkSelectorpublic void addOwnedBy(OwnedBySelector o)
o - OwnedBySelectorpublic void addPosixGroup(PosixGroupSelector o)
o - PosixGroupSelectorpublic void addPosixPermissions(PosixPermissionsSelector o)
o - PosixPermissionsSelectorpublic void add(FileSelector selector)
add in interface SelectorContainerselector - the selector to addprotected void dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p)
throws BuildException
DataTypeIf one is included, throw a BuildException created by circularReference.
This implementation is appropriate only for a DataType that cannot hold other DataTypes as children.
The general contract of this method is that it shouldn't do
anything if DataType.checked is true and
set it to true on exit.
dieOnCircularReference in class DataTypestk - the stack of references to check.p - the project to use to dereference the references.BuildException - on error.