org.apache.tools.ant.types.resources
Class BaseResourceCollectionContainer
- Cloneable, ResourceCollection
public abstract class BaseResourceCollectionContainer
Base class for ResourceCollections that nest multiple ResourceCollections.
void | add(ResourceCollection c) - Add a ResourceCollection to the container.
|
void | addAll(Collection c) - Add the Collection of ResourceCollections to the container.
|
void | clear() - Clear the container.
|
Object | clone() - Implement clone.
|
protected void | dieOnCircularReference(Stack stk, Project p) - Overrides the version of DataType to recurse on all DataType
child elements that may have been added.
|
protected abstract Collection | getCollection() - Template method for subclasses to return a Collection object of Resources.
|
protected List | getResourceCollections() - Get the nested ResourceCollections.
|
boolean | isCache() - Learn whether to cache collections.
|
boolean | isFilesystemOnly() - Fulfill the ResourceCollection contract.
|
Iterator | iterator() - Fulfill the ResourceCollection contract.
|
void | setCache(boolean b) - Set whether to cache collections.
|
int | size() - Fulfill the ResourceCollection contract.
|
String | toString() - Format this BaseResourceCollectionContainer as a String.
|
checkAttributesAllowed , checkChildrenAllowed , circularReference , clone , dieOnCircularReference , dieOnCircularReference , dieOnCircularReference , getCheckedRef , getCheckedRef , getCheckedRef , getCheckedRef , getDataTypeName , getRefid , invokeCircularReferenceCheck , isChecked , isReference , noChildrenAllowed , setChecked , setRefid , toString , tooManyAttributes |
addAll
public void addAll(Collection c)
throws BuildException
Add the Collection of ResourceCollections to the container.
c
- the Collection whose elements to add.
clone
public Object clone()
Implement clone. The set of nested resource
collections is shallowly cloned.
- clone in interface DataType
dieOnCircularReference
protected void dieOnCircularReference(Stack stk,
Project p)
throws BuildException
Overrides the version of DataType to recurse on all DataType
child elements that may have been added.
- dieOnCircularReference in interface DataType
stk
- the stack of data types to use (recursively).p
- the project to use to dereference the references.
getCollection
protected abstract Collection getCollection()
Template method for subclasses to return a Collection object of Resources.
getResourceCollections
protected final List getResourceCollections()
Get the nested ResourceCollections.
isCache
public boolean isCache()
Learn whether to cache collections. Default is true
.
isFilesystemOnly
public boolean isFilesystemOnly()
Fulfill the ResourceCollection contract.
- isFilesystemOnly in interface ResourceCollection
- whether this is a filesystem-only resource collection.
iterator
public final Iterator iterator()
Fulfill the ResourceCollection contract. The Iterator returned
will throw ConcurrentModificationExceptions if ResourceCollections
are added to this container while the Iterator is in use.
- iterator in interface ResourceCollection
setCache
public void setCache(boolean b)
Set whether to cache collections.
size
public int size()
Fulfill the ResourceCollection contract.
- size in interface ResourceCollection
- number of elements as int.
toString
public String toString()
Format this BaseResourceCollectionContainer as a String.
- toString in interface DataType