Strips the FileProvider interface from decorated resources since it may be used to circumvent name mapping.
Modifier and Type | Field and Description |
---|---|
private final FileNameMapper |
Access | Constructor and Description |
---|---|
public | MappedResource(Resource
Resource to wrap r, FileNameMapper FileNameMapper that handles mapping m)Wraps an existing resource. |
Modifier and Type | Method and Description |
---|---|
public <T> T | as(Class<T>
the type to implement clazz)Overrides org. |
public boolean | equals(Object
the object to check against. other)Overrides org. |
public String | |
public int | hashCode()
Overrides org. |
public void | setRefid(Reference
reference to set r)Overrides org. |
public String | toString()
Overrides org. |
mapper | back to summary |
---|---|
private final FileNameMapper mapper |
MappedResource | back to summary |
---|---|
public MappedResource(Resource r, FileNameMapper m) Wraps an existing resource.
|
as | back to summary |
---|---|
public <T> T as(Class<T> clazz) Overrides org. Suppress FileProvider
|
equals | back to summary |
---|---|
public boolean equals(Object other) Overrides org. Equality check based on the resource's name in addition to the resource itself.
|
getName | back to summary |
---|---|
public String getName() Overrides org. Maps the name.
|
hashCode | back to summary |
---|---|
public int hashCode() Overrides org. Get the hash code for this Resource.
|
setRefid | back to summary |
---|---|
public void setRefid(Reference r) Overrides org. Not really supported since mapper is never null. |
toString | back to summary |
---|---|
public String toString() Overrides org. Doc from org. Get the string representation of this Resource. |