public class MatrixVariableMethodArgumentResolver extends AbstractNamedValueSyncArgumentResolver
@MatrixVariable
.
If the method parameter is of type Map
it will by resolved by
MatrixVariableMapMethodArgumentResolver
instead unless the annotation
specifies a name in which case it is considered to be a single attribute of
type map (vs multiple attributes collected in a map).
MatrixVariableMapMethodArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
logger
Constructor and Description |
---|
MatrixVariableMethodArgumentResolver(ConfigurableBeanFactory factory,
ReactiveAdapterRegistry registry) |
Modifier and Type | Method and Description |
---|---|
protected AbstractNamedValueArgumentResolver.NamedValueInfo |
createNamedValueInfo(MethodParameter parameter)
Create the
AbstractNamedValueArgumentResolver.NamedValueInfo object for the given method parameter. |
protected void |
handleMissingValue(String name,
MethodParameter parameter)
Invoked when a named value is required, but
AbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange) returned
null and there is no default value. |
protected Object |
resolveNamedValue(String name,
MethodParameter param,
ServerWebExchange exchange)
Actually resolve the value synchronously.
|
boolean |
supportsParameter(MethodParameter parameter)
Whether this resolver supports the given method parameter.
|
resolveArgument, resolveArgumentValue, resolveName
handleMissingValue, handleResolvedValue
checkAnnotatedParamNoReactiveWrapper, checkParameterType, checkParameterTypeNoReactiveWrapper, getAdapterRegistry
public MatrixVariableMethodArgumentResolver(@Nullable ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry)
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
parameter
- the method parameterprotected AbstractNamedValueArgumentResolver.NamedValueInfo createNamedValueInfo(MethodParameter parameter)
AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.NamedValueInfo
object for the given method parameter.
Implementations typically retrieve the method annotation by means of
MethodParameter.getParameterAnnotation(Class)
.createNamedValueInfo
in class AbstractNamedValueArgumentResolver
parameter
- the method parameter@Nullable protected Object resolveNamedValue(String name, MethodParameter param, ServerWebExchange exchange)
AbstractNamedValueSyncArgumentResolver
resolveNamedValue
in class AbstractNamedValueSyncArgumentResolver
protected void handleMissingValue(String name, MethodParameter parameter) throws ServerWebInputException
AbstractNamedValueArgumentResolver
AbstractNamedValueArgumentResolver.resolveName(String, MethodParameter, ServerWebExchange)
returned
null
and there is no default value. Subclasses typically throw an
exception in this case.handleMissingValue
in class AbstractNamedValueArgumentResolver
name
- the name for the valueparameter
- the method parameterServerWebInputException