|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.resources.MappedResourceCollection
public class MappedResourceCollection
Wrapper around a resource collections that maps the names of the other collection using a configured mapper.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.types.DataType |
|---|
checked, ref |
| Fields inherited from class org.apache.tools.ant.ProjectComponent |
|---|
description, location, project |
| Constructor Summary | |
|---|---|
MappedResourceCollection()
|
|
| Method Summary | |
|---|---|
void |
add(FileNameMapper fileNameMapper)
Add a nested filenamemapper. |
void |
add(ResourceCollection c)
Adds the required nested ResourceCollection. |
java.lang.Object |
clone()
Implement clone. |
Mapper |
createMapper()
Define the mapper to map source to destination files. |
protected void |
dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p)
Overrides the version of DataType to recurse on all DataType child elements that may have been added. |
boolean |
isFilesystemOnly()
Indicate whether this ResourceCollection is composed entirely of Resources accessible via local filesystem conventions. |
java.util.Iterator<Resource> |
iterator()
Gets the contents of this collection. |
void |
setCache(boolean cache)
Set whether to cache collections. |
void |
setEnableMultipleMappings(boolean enableMultipleMappings)
Set method of handling mappers that return multiple mappings for a given source path. |
void |
setRefid(Reference r)
Overrides the base version. |
int |
size()
Learn the number of contained Resources. |
java.lang.String |
toString()
Format this resource collection as a String. |
| Methods inherited from class org.apache.tools.ant.types.DataType |
|---|
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes |
| Methods inherited from class org.apache.tools.ant.ProjectComponent |
|---|
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MappedResourceCollection()
| Method Detail |
|---|
public void add(ResourceCollection c)
throws BuildException
c - the ResourceCollection to add.
BuildException - on error.
public Mapper createMapper()
throws BuildException
BuildException - if more than one mapper is defined.public void add(FileNameMapper fileNameMapper)
fileNameMapper - the mapper to add.public void setEnableMultipleMappings(boolean enableMultipleMappings)
enableMultipleMappings - If true the type will
use all the mappings for a given source path, if
false, only the first mapped name is
processed.
By default, this setting is false to provide backward
compatibility with earlier releases.public void setCache(boolean cache)
public boolean isFilesystemOnly()
FileProvider when asked via Resource.as(java.lang.Class) .
isFilesystemOnly in interface ResourceCollectionpublic int size()
size in interface ResourceCollectionpublic java.util.Iterator<Resource> iterator()
iterator in interface java.lang.Iterable<Resource>iterator in interface ResourceCollectionpublic void setRefid(Reference r)
setRefid in class DataTyper - the Reference to set.public java.lang.Object clone()
clone in class DataType
protected void dieOnCircularReference(java.util.Stack<java.lang.Object> stk,
Project p)
throws BuildException
dieOnCircularReference in class DataTypestk - the stack of data types to use (recursively).p - the project to use to dereference the references.
BuildException - on error.public java.lang.String toString()
toString in class DataTypeString.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||