Top Description Fields Constructors Methods
org.apache.tools.ant.types.resources

public Class Restrict

extends ResourceSelectorContainer
implements ResourceCollection
Class Inheritance
All Implemented Interfaces
org.apache.tools.ant.types.ResourceCollection, java.lang.Iterable
Known Direct Subclasses
org.apache.tools.ant.taskdefs.Checksum.FileUnion, org.apache.tools.ant.taskdefs.DependSet.NonExistent
Imports
java.util.Iterator, .Stack, org.apache.tools.ant.Project, org.apache.tools.ant.types.Resource, .ResourceCollection, org.apache.tools.ant.types.resources.selectors.ResourceSelector, .ResourceSelectorContainer

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 Summary

Modifier and TypeField and Description
private LazyResourceCollectionWrapper
w

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized void
add(ResourceCollection
the ResourceCollection to add.
c
)

Add the ResourceCollection.

public synchronized void
add(ResourceSelector
the ResourceSelector to add.
s
)

Overrides org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.add.

Add a ResourceSelector.
protected synchronized void
dieOnCircularReference(Stack<Object>
the Stack of references.
stk
,
Project
the Project to resolve against.
p
)

Overrides org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.dieOnCircularReference.

Overrides the version from DataType to recurse on nested ResourceSelectors.
private Restrict
public synchronized boolean

Returns:

boolean cache flag.
isCache
()

Learn whether to cache collections.

public synchronized boolean

Returns:

whether this is a filesystem-only resource collection.
isFilesystemOnly
()

Implements org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly.

Fulfill the ResourceCollection contract.
public final synchronized Iterator<Resource>

Returns:

an Iterator of Resources.
iterator
()

Implements java.lang.Iterable.iterator.

Fulfill the ResourceCollection contract.
public synchronized void
setCache(boolean
boolean cache flag.
b
)

Set whether to cache collections.

public synchronized int

Returns:

number of elements as int.
size
()

Implements org.apache.tools.ant.types.ResourceCollection.size.

Fulfill the ResourceCollection contract.
public synchronized String

Returns:

the String value of this collection.
toString
()

Overrides org.apache.tools.ant.types.DataType.toString.

Format this Restrict collection as a String.
Inherited from org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer:
getResourceSelectorsgetSelectorshasSelectorsselectorCount

Field Detail

wback to summary
private LazyResourceCollectionWrapper w

Constructor Detail

Restrictback to summary
public Restrict()

Method Detail

addback to summary
public synchronized void add(ResourceCollection c)

Add the ResourceCollection.

Parameters
c:ResourceCollection

the ResourceCollection to add.

addback to summary
public synchronized void add(ResourceSelector s)

Overrides org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.add.

Add a ResourceSelector.

Parameters
s:ResourceSelector

the ResourceSelector to add.

Annotations
@Override
dieOnCircularReferenceback to summary
protected synchronized void dieOnCircularReference(Stack<Object> stk, Project p)

Overrides org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.dieOnCircularReference.

Doc from org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.dieOnCircularReference.

Overrides the version from DataType to recurse on nested ResourceSelectors.

Parameters
stk:Stack<Object>

the Stack of references.

p:Project

the Project to resolve against.

Annotations
@Override
getRefback to summary
private Restrict getRef()

Hides org.apache.tools.ant.types.resources.selectors.ResourceSelectorContainer.getRef.

isCacheback to summary
public synchronized boolean isCache()

Learn whether to cache collections. Default is true.

Returns:boolean

boolean cache flag.

isFilesystemOnlyback to summary
public synchronized boolean isFilesystemOnly()

Implements org.apache.tools.ant.types.ResourceCollection.isFilesystemOnly.

Fulfill the ResourceCollection contract.

Returns:boolean

whether this is a filesystem-only resource collection.

Annotations
@Override
iteratorback to summary
public final synchronized Iterator<Resource> iterator()

Implements java.lang.Iterable.iterator.

Fulfill the ResourceCollection contract.

Returns:Iterator<Resource>

an Iterator of Resources.

Annotations
@Override
setCacheback to summary
public synchronized void setCache(boolean b)

Set whether to cache collections.

Parameters
b:boolean

boolean cache flag.

sizeback to summary
public synchronized int size()

Implements org.apache.tools.ant.types.ResourceCollection.size.

Fulfill the ResourceCollection contract.

Returns:int

number of elements as int.

Annotations
@Override
toStringback to summary
public synchronized String toString()

Overrides org.apache.tools.ant.types.DataType.toString.

Format this Restrict collection as a String.

Returns:String

the String value of this collection.

Annotations
@Override