public class MappedResource extends ResourceDecorator
Strips the FileProvider interface from decorated resources since it may be used to circumvent name mapping.
MAGIC, UNKNOWN_DATETIME, UNKNOWN_SIZE
description, location, project
Constructor and Description |
---|
MappedResource(Resource r,
FileNameMapper m)
Wraps an existing resource.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
as(java.lang.Class 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.
|
addConfigured, compareTo, dieOnCircularReference, getInputStream, getLastModified, getOutputStream, getResource, getSize, isDirectory, isExists, isFilesystemOnly, setDirectory, setExists, setLastModified, setName, setSize
clone, getMagicNumber, iterator, size, toLongString, toString
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributes
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
public MappedResource(Resource r, FileNameMapper m)
r
- Resource to wrapm
- FileNameMapper that handles mappingpublic java.lang.String getName()
getName
in class ResourceDecorator
public void setRefid(Reference r)
setRefid
in class ResourceDecorator
r
- reference to setpublic java.lang.Object as(java.lang.Class clazz)
as
in class ResourceDecorator
clazz
- the type to implementpublic int hashCode()
hashCode
in class ResourceDecorator