Package 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
See Also:
  - `HandlerMethodReturnValueHandler`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### 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

@Nullable Object resolveArgument(org.springframework.core.MethodParameter parameter, @Nullable ModelAndViewContainer mavContainer, NativeWebRequest webRequest, @Nullable 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)` which 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` if not resolvable
Throws:
  `Exception` - in case of errors with the preparation of argument values