|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.web.method.support.HandlerMethodArgumentResolverComposite
public class HandlerMethodArgumentResolverComposite
Resolves method parameters by delegating to a list of registered HandlerMethodArgumentResolver
s.
Previously resolved method parameters are cached for faster lookups.
Field Summary | |
---|---|
protected Log |
logger
|
Constructor Summary | |
---|---|
HandlerMethodArgumentResolverComposite()
|
Method Summary | |
---|---|
HandlerMethodArgumentResolverComposite |
addResolver(HandlerMethodArgumentResolver argumentResolver)
Add the given HandlerMethodArgumentResolver . |
HandlerMethodArgumentResolverComposite |
addResolvers(List<? extends HandlerMethodArgumentResolver> argumentResolvers)
Add the given HandlerMethodArgumentResolver s. |
List<HandlerMethodArgumentResolver> |
getResolvers()
Return a read-only list with the contained resolvers, or an empty list. |
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 . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Log logger
Constructor Detail |
---|
public HandlerMethodArgumentResolverComposite()
Method Detail |
---|
public List<HandlerMethodArgumentResolver> getResolvers()
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
.
supportsParameter
in interface HandlerMethodArgumentResolver
parameter
- the method parameter to check
true
if this resolver supports the supplied parameter;
false
otherwisepublic Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws 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)
and it must have returned true
mavContainer
- the ModelAndViewContainer for the current requestwebRequest
- the current requestbinderFactory
- a factory for creating WebDataBinder
instances
null
.
IllegalStateException
- if no suitable HandlerMethodArgumentResolver
is found.
Exception
- in case of errors with the preparation of argument valuespublic HandlerMethodArgumentResolverComposite addResolver(HandlerMethodArgumentResolver argumentResolver)
HandlerMethodArgumentResolver
.
public HandlerMethodArgumentResolverComposite addResolvers(List<? extends HandlerMethodArgumentResolver> argumentResolvers)
HandlerMethodArgumentResolver
s.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |