Class Restrict
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer
org.apache.tools.ant.types.resources.Restrict
- All Implemented Interfaces:
- Cloneable,- Iterable<Resource>,- ResourceCollection
ResourceCollection that allows a number of selectors to be
 applied to a single ResourceCollection for the purposes of
 restricting or narrowing results.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd the ResourceCollection.voidAdd a ResourceSelector.protected voiddieOnCircularReference(Stack<Object> stk, Project p) Overrides the version from DataType to recurse on nested ResourceSelectors.booleanisCache()Learn whether to cache collections.booleanFulfill the ResourceCollection contract.iterator()Fulfill the ResourceCollection contract.voidsetCache(boolean b) Set whether to cache collections.intsize()Fulfill the ResourceCollection contract.toString()Format this Restrict collection as a String.Methods inherited from class org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainergetResourceSelectors, getSelectors, hasSelectors, selectorCountMethods inherited from class org.apache.tools.ant.types.DataTypecheckAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponentgetDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class java.lang.Objectequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollectionisEmpty, stream
- 
Constructor Details- 
Restrictpublic Restrict()
 
- 
- 
Method Details- 
addAdd the ResourceCollection.- Parameters:
- c- the ResourceCollection to add.
 
- 
setCachepublic void setCache(boolean b) Set whether to cache collections.- Parameters:
- b- boolean cache flag.
 
- 
isCachepublic boolean isCache()Learn whether to cache collections. Default istrue.- Returns:
- boolean cache flag.
 
- 
addAdd a ResourceSelector.- Overrides:
- addin class- ResourceSelectorContainer
- Parameters:
- s- the ResourceSelector to add.
 
- 
iteratorFulfill the ResourceCollection contract.
- 
sizepublic int size()Fulfill the ResourceCollection contract.- Specified by:
- sizein interface- ResourceCollection
- Returns:
- number of elements as int.
 
- 
isFilesystemOnlypublic boolean isFilesystemOnly()Fulfill the ResourceCollection contract.- Specified by:
- isFilesystemOnlyin interface- ResourceCollection
- Returns:
- whether this is a filesystem-only resource collection.
 
- 
toStringFormat this Restrict collection as a String.
- 
dieOnCircularReferenceDescription copied from class:ResourceSelectorContainerOverrides the version from DataType to recurse on nested ResourceSelectors.- Overrides:
- dieOnCircularReferencein class- ResourceSelectorContainer
- Parameters:
- stk- the Stack of references.
- p- the Project to resolve against.
 
 
-