public class ChainedResourceResolver extends Object implements ResourceResolver
ChainedResourceResolver is a ResourceResolver that chains together one or more other ResourceResolvers, those of which will be queried (in the order in which they are added to the ChainedResourceResolver) when attempting to resolve a resource.| Constructor and Description |
|---|
ChainedResourceResolver(ResourceResolver... resourceResolvers)
Constructs a
ChainedResourceResolver. |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
getResource(Class<R> clsResource)
Attempts to retrieve the resource that was registered with the specified class.
|
<R> R |
getResource(Class<R> clsResource, String sResourceName)
Attempts to retrieve the resource that was registered with the specified class and name.
|
public ChainedResourceResolver(ResourceResolver... resourceResolvers)
ChainedResourceResolver.resourceResolvers - the ResourceResolvers to querypublic <R> R getResource(Class<R> clsResource)
getResource in interface ResourceResolverR - the type of the resourceclsResource - the class of the resourcenull if the resource is unknown to the ResourceRegistrypublic <R> R getResource(Class<R> clsResource, String sResourceName)
getResource in interface ResourceResolverR - the type of the resourceclsResource - the class of the resourcesResourceName - the name of the resourcenull if the resource is unknown to the ResourceRegistry