public class HandlerMethodArgumentResolverComposite extends java.lang.Object implements HandlerMethodArgumentResolver
HandlerMethodArgumentResolver
s.
Previously resolved method parameters are cached for faster lookups.Constructor and Description |
---|
HandlerMethodArgumentResolverComposite() |
Modifier and Type | Method and Description |
---|---|
HandlerMethodArgumentResolverComposite |
addResolver(HandlerMethodArgumentResolver resolver)
Add the given
HandlerMethodArgumentResolver . |
HandlerMethodArgumentResolverComposite |
addResolvers(java.util.List<? extends HandlerMethodArgumentResolver> resolvers)
Add the given
HandlerMethodArgumentResolver s. |
java.util.List<HandlerMethodArgumentResolver> |
getResolvers()
Return a read-only list with the contained resolvers, or an empty list.
|
java.lang.Object |
resolveArgument(MethodParameter parameter,
ModelAndViewContainer mavContainer,
NativeWebRequest webRequest,
WebDataBinderFactory binderFactory)
Iterate over registered
HandlerMethodArgumentResolver s and invoke the one that supports it. |
boolean |
supportsParameter(MethodParameter parameter)
Whether the given method parameter is supported by any registered
HandlerMethodArgumentResolver . |
protected final Log logger
public HandlerMethodArgumentResolverComposite()
public java.util.List<HandlerMethodArgumentResolver> getResolvers()
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
.supportsParameter
in interface HandlerMethodArgumentResolver
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter;
false
otherwisepublic java.lang.Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws java.lang.Exception
HandlerMethodArgumentResolver
s and invoke the one that supports it.resolveArgument
in interface HandlerMethodArgumentResolver
parameter
- the method parameter to resolve. This parameter must
have previously been passed to HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)
which must
have returned true
.mavContainer
- the ModelAndViewContainer for the current requestwebRequest
- the current requestbinderFactory
- a factory for creating WebDataBinder
instancesnull
java.lang.IllegalStateException
- if no suitable HandlerMethodArgumentResolver
is found.java.lang.Exception
- in case of errors with the preparation of argument valuespublic HandlerMethodArgumentResolverComposite addResolver(HandlerMethodArgumentResolver resolver)
HandlerMethodArgumentResolver
.public HandlerMethodArgumentResolverComposite addResolvers(java.util.List<? extends HandlerMethodArgumentResolver> resolvers)
HandlerMethodArgumentResolver
s.