spring-web

org.springframework.web.method.support
Interface HandlerMethodArgumentResolver

All Known Implementing Classes:
AbstractCookieValueMethodArgumentResolver, AbstractNamedValueMethodArgumentResolver, AbstractWebArgumentResolverAdapter, ErrorsMethodArgumentResolver, ExpressionValueMethodArgumentResolver, HandlerMethodArgumentResolverComposite, MapMethodProcessor, ModelAttributeMethodProcessor, ModelMethodProcessor, RequestHeaderMapMethodArgumentResolver, RequestHeaderMethodArgumentResolver, RequestParamMapMethodArgumentResolver, RequestParamMethodArgumentResolver, SessionStatusMethodArgumentResolver

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
 java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory)
          Resolves a method parameter into an argument value from a given request.
 boolean supportsParameter(org.springframework.core.MethodParameter parameter)
          Whether the given method parameter is supported by this resolver.
 

Method Detail

supportsParameter

boolean supportsParameter(org.springframework.core.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

java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter,
                                 ModelAndViewContainer mavContainer,
                                 NativeWebRequest webRequest,
                                 WebDataBinderFactory binderFactory)
                                 throws java.lang.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:
java.lang.Exception - in case of errors with the preparation of argument values

spring-web