org.springframework.web.method.support
Interface HandlerMethodArgumentResolver

All Known Implementing Classes:
AbstractCookieValueMethodArgumentResolver, AbstractMessageConverterMethodArgumentResolver, AbstractMessageConverterMethodProcessor, AbstractNamedValueMethodArgumentResolver, AbstractWebArgumentResolverAdapter, ErrorsMethodArgumentResolver, ExpressionValueMethodArgumentResolver, HandlerMethodArgumentResolverComposite, HttpEntityMethodProcessor, MapMethodProcessor, ModelAttributeMethodProcessor, ModelMethodProcessor, PathVariableMethodArgumentResolver, RedirectAttributesMethodArgumentResolver, RequestHeaderMapMethodArgumentResolver, RequestHeaderMethodArgumentResolver, RequestParamMapMethodArgumentResolver, RequestParamMethodArgumentResolver, RequestPartMethodArgumentResolver, RequestResponseBodyMethodProcessor, ServletCookieValueMethodArgumentResolver, ServletModelAttributeMethodProcessor, ServletRequestMethodArgumentResolver, ServletResponseMethodArgumentResolver, ServletWebArgumentResolverAdapter, SessionStatusMethodArgumentResolver, UriComponentsBuilderMethodArgumentResolver

public interface HandlerMethodArgumentResolver

Strategy interface for resolving method parameters into argument values in the context of a given request.

Since:
3.1
Author:
Arjen Poutsma

Method Summary
 Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory)
          Resolves a method parameter into an argument value from a given request.
 boolean supportsParameter(MethodParameter parameter)
          Whether the given method parameter is supported by this resolver.
 

Method Detail

supportsParameter

boolean supportsParameter(MethodParameter parameter)
Whether the given method parameter is supported by this resolver.

Parameters:
parameter - the method parameter to check
Returns:
true if this resolver supports the supplied parameter; false otherwise

resolveArgument

Object resolveArgument(MethodParameter parameter,
                       ModelAndViewContainer mavContainer,
                       NativeWebRequest webRequest,
                       WebDataBinderFactory binderFactory)
                       throws Exception
Resolves a method parameter into an argument value from a given request. A ModelAndViewContainer provides access to the model for the request. A WebDataBinderFactory provides a way to create a WebDataBinder instance when needed for data binding and type conversion purposes.

Parameters:
parameter - the method parameter to resolve. This parameter must have previously been passed to supportsParameter(org.springframework.core.MethodParameter) and it must have returned true
mavContainer - the ModelAndViewContainer for the current request
webRequest - the current request
binderFactory - a factory for creating WebDataBinder instances
Returns:
the resolved argument value, or null.
Throws:
Exception - in case of errors with the preparation of argument values