|
|||||||||
| 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.Resource
org.apache.tools.ant.types.resources.ResourceDecorator
org.apache.tools.ant.types.resources.MappedResource
public class MappedResource
A decorator around a different resource that uses a mapper to dynamically remap the resource's name.
Strips the FileProvider interface from decorated resources since it may be used to circumvent name mapping.
| Field Summary |
|---|
| Fields inherited from class org.apache.tools.ant.types.Resource |
|---|
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE |
| 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 | |
|---|---|
MappedResource(Resource r,
FileNameMapper m)
Wraps an existing resource. |
|
| Method Summary | ||
|---|---|---|
|
as(java.lang.Class<T> clazz)
Suppress FileProvider |
|
boolean |
equals(java.lang.Object other)
Equality check based on the resource's name in addition to the resource itself. |
|
java.lang.String |
getName()
Maps the name. |
|
int |
hashCode()
Get the hash code for this Resource. |
|
void |
setRefid(Reference r)
Not really supported since mapper is never null. |
|
java.lang.String |
toString()
Get the string representation of this Resource. |
|
| Methods inherited from class org.apache.tools.ant.types.resources.ResourceDecorator |
|---|
addConfigured, compareTo, dieOnCircularReference, getInputStream, getLastModified, getOutputStream, getResource, getSize, isDirectory, isExists, isFilesystemOnly, setDirectory, setExists, setLastModified, setName, setSize |
| Methods inherited from class org.apache.tools.ant.types.Resource |
|---|
clone, getMagicNumber, iterator, size, toLongString |
| 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 |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public MappedResource(Resource r,
FileNameMapper m)
r - Resource to wrapm - FileNameMapper that handles mapping| Method Detail |
|---|
public java.lang.String getName()
getName in class ResourceDecoratorpublic void setRefid(Reference r)
setRefid in class ResourceDecoratorr - reference to setpublic <T> T as(java.lang.Class<T> clazz)
as in class ResourceDecoratorclazz - the type to implementpublic int hashCode()
hashCode in class ResourceDecoratorpublic boolean equals(java.lang.Object other)
equals in class Resourceother - the object to check against.
public java.lang.String toString()
Resource
toString in class Resource
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||