Package org.springframework.web.service.invoker

# Class RequestAttributeArgumentResolver

java.lang.Object
org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver
org.springframework.web.service.invoker.RequestAttributeArgumentResolver

All Implemented Interfaces:
  `HttpServiceArgumentResolver`

public class RequestAttributeArgumentResolver extends AbstractNamedValueArgumentResolver
`HttpServiceArgumentResolver` for `@RequestAttribute` annotated arguments.

The argument may be a single variable value or a `Map` with multiple variables and values.

If the value is required but `null`, `IllegalArgumentException` is raised. The value is not required if:

- `RequestAttribute.required()` is set to `false`
- The argument is declared as `Optional`

Since:
  6.0
Author:
  Rossen Stoyanchev

## Nested Class Summary

## Nested classes/interfaces inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver

`AbstractNamedValueArgumentResolver.NamedValueInfo`

## Field Summary

### Fields inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver

`logger`

## Constructor Summary

Constructors
Constructor
Description
`RequestAttributeArgumentResolver()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addRequestValue(String name, Object value, org.springframework.core.MethodParameter parameter, HttpRequestValues.Builder requestValues)`
Add the given, single request value.
`protected AbstractNamedValueArgumentResolver.NamedValueInfo`
`createNamedValueInfo(org.springframework.core.MethodParameter parameter)`
Return information about the request value, or `null` if the parameter does not represent a request value of interest.

### Methods inherited from class org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver

`createNamedValueInfo, resolve`

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

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

## Constructor Details

### RequestAttributeArgumentResolver

public RequestAttributeArgumentResolver()

## Method Details

### createNamedValueInfo

@Nullable protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(org.springframework.core.MethodParameter parameter)
Description copied from class: `AbstractNamedValueArgumentResolver`
Return information about the request value, or `null` if the parameter does not represent a request value of interest.

Specified by:
  `createNamedValueInfo` in class `AbstractNamedValueArgumentResolver`

### addRequestValue

protected void addRequestValue(String name, Object value, org.springframework.core.MethodParameter parameter, HttpRequestValues.Builder requestValues)
Description copied from class: `AbstractNamedValueArgumentResolver`
Add the given, single request value. This may be called multiples times if the request value is multivalued.

If the resolver was created with a `ConversionService`, the value will have been converted to a String and may be cast down.

Specified by:
  `addRequestValue` in class `AbstractNamedValueArgumentResolver`
Parameters:
  `name` - the request value name
  `value` - the value
  `parameter` - the method parameter type, nested if Map, List/array, or Optional
  `requestValues` - builder to add the request value to