Package org.springframework.web.servlet.mvc.method.annotation

# Class ServletRequestMethodArgumentResolver

java.lang.Object
org.springframework.web.servlet.mvc.method.annotation.ServletRequestMethodArgumentResolver

All Implemented Interfaces:
  `org.springframework.web.method.support.HandlerMethodArgumentResolver`

public class ServletRequestMethodArgumentResolver extends Object implements org.springframework.web.method.support.HandlerMethodArgumentResolver
Resolves servlet backed request-related method arguments.

Supports values of the following types:

- `WebRequest`
- `ServletRequest`
- `MultipartRequest`
- `HttpSession`
- `PushBuilder`
- `Principal` but only if not annotated in order to allow custom resolvers to resolve it, and then falling back on `PrincipalMethodArgumentResolver`
- `InputStream`
- `Reader`
- `HttpMethod`
- `Locale`
- `TimeZone`
- `ZoneId`

Since:
  3.1
Author:
  Arjen Poutsma, Rossen Stoyanchev, Juergen Hoeller

## Constructor Summary

Constructors
Constructor
Description
`ServletRequestMethodArgumentResolver()`

## Method Summary

Modifier and Type
Method
Description
`Object`
`resolveArgument(org.springframework.core.MethodParameter parameter, org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, org.springframework.web.bind.support.WebDataBinderFactory binderFactory)`
`boolean`
`supportsParameter(org.springframework.core.MethodParameter parameter)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### ServletRequestMethodArgumentResolver

public ServletRequestMethodArgumentResolver()

## Method Details

### supportsParameter

public boolean supportsParameter(org.springframework.core.MethodParameter parameter)

Specified by:
  `supportsParameter` in interface `org.springframework.web.method.support.HandlerMethodArgumentResolver`

### resolveArgument

@Nullable public Object resolveArgument(org.springframework.core.MethodParameter parameter, @Nullable org.springframework.web.method.support.ModelAndViewContainer mavContainer, org.springframework.web.context.request.NativeWebRequest webRequest, @Nullable org.springframework.web.bind.support.WebDataBinderFactory binderFactory) throws Exception

Specified by:
  `resolveArgument` in interface `org.springframework.web.method.support.HandlerMethodArgumentResolver`
Throws:
  `Exception`