Top Description Fields Constructors Methods
org.springframework.web.service.invoker

public Class PathVariableArgumentResolver

extends AbstractNamedValueArgumentResolver
Class Inheritance
Imports
org.springframework.core.MethodParameter, org.springframework.core.convert.ConversionService, org.springframework.web.bind.annotation.PathVariable

HttpServiceArgumentResolver for @PathVariable annotated arguments.

The argument may be a single variable value or a Map with multiple variables and values. Each value may be a String or an Object to be converted to a String through the configured ConversionService.

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

Authors
Olga Maciaszek-Sharma, Rossen Stoyanchev
Since
6.0

Field Summary

Inherited from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver:
logger

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
addRequestValue(String
the request value name
name
,
Object
the value
value
,
MethodParameter
the method parameter type, nested if Map, List/array, or Optional
parameter
,
HttpRequestValues.Builder
builder to add the request value to
requestValues
)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

Add the given, single request value.

protected AbstractNamedValueArgumentResolver.NamedValueInfo
createNamedValueInfo(MethodParameter parameter)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Return information about the request value, or null if the parameter does not represent a request value of interest.

Inherited from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver:
resolve

Constructor Detail

PathVariableArgumentResolverback to summary
public PathVariableArgumentResolver(ConversionService conversionService)

Method Detail

addRequestValueback to summary
protected void addRequestValue(String name, Object value, MethodParameter parameter, HttpRequestValues.Builder requestValues)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

Doc from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.addRequestValue.

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.

Parameters
name:String

the request value name

value:Object

the value

parameter:MethodParameter

the method parameter type, nested if Map, List/array, or Optional

requestValues:HttpRequestValues.Builder

builder to add the request value to

Annotations
@Override
createNamedValueInfoback to summary
protected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)

Implements abstract org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Doc from org.springframework.web.service.invoker.AbstractNamedValueArgumentResolver.createNamedValueInfo.

Return information about the request value, or null if the parameter does not represent a request value of interest.

Annotations
@Override