Subclasses define how to do the following:
A default value string can contain ${...} placeholders and Spring Expression
Language #{...} expressions. For this to work a
ConfigurableBeanFactory must be supplied to the class constructor.
| Modifier and Type | Class and Description |
|---|---|
| private static class | AbstractNamedValueArgumentResolver.
Inner class to avoid a hard dependency on Kotlin at runtime. |
| protected static class | AbstractNamedValueArgumentResolver.
Represents the information about a named value, including name, whether it's required and a default value. |
| Modifier and Type | Field and Description |
|---|---|
| private final ConfigurableBeanFactory | |
| private final BeanExpressionContext | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | AbstractNamedValueArgumentResolver(ConfigurableBeanFactory
a bean factory to use for resolving factory, ReactiveAdapterRegistry ${...} placeholder
and #{...} SpEL expressions in default values, or null if default
values are not expected to contain expressionsfor checking reactive type wrappers registry)Create a new |
| Modifier and Type | Method and Description |
|---|---|
| private Object | applyConversion(Object value, AbstractNamedValueArgumentResolver.
Apply type conversion if necessary. |
| protected abstract AbstractNamedValueArgumentResolver. | Returns: the named value informationthe method parameter parameter)Create the |
| private Mono | getDefaultValue(AbstractNamedValueArgumentResolver.
Resolve the default value, if any. |
| private AbstractNamedValueArgumentResolver. | |
| protected void | handleMissingValue(String
the name for the value name, MethodParameter the method parameter parameter, ServerWebExchange the current exchange exchange)Invoked when a named value is required, but
|
| protected void | handleMissingValue(String
the name for the value name, MethodParameter the method parameter parameter)Invoked when a named value is required, but
|
| private Object | handleNullValue(String name, Object value, Class<?> paramType)
A |
| protected void | handleResolvedValue(Object
the resolved argument value arg, String the argument name name, MethodParameter the argument parameter type parameter, Model the model model, ServerWebExchange the current exchange exchange)Invoked after a value is resolved. |
| public Mono | resolveArgument(MethodParameter
the method parameter parameter, BindingContext the binding context to use bindingContext, ServerWebExchange the current exchange exchange)Implements org. Resolve the value for the method parameter. |
| private Object | resolveEmbeddedValuesAndExpressions(String value)
Resolve the given annotation-specified value, potentially containing placeholders and expressions. |
| protected abstract Mono | Returns: the resolved argument (may be emptyMono)the name of the value being resolved name, MethodParameter the method parameter to resolve to an argument value
(pre-nested in case of a parameter, ServerWebExchange java. declaration)the current exchange exchange)Resolve the given parameter type and value name into an argument value. |
| private AbstractNamedValueArgumentResolver. | updateNamedValueInfo(MethodParameter parameter, AbstractNamedValueArgumentResolver.
Create a new NamedValueInfo based on the given NamedValueInfo with sanitized values. |
| configurableBeanFactory | back to summary |
|---|---|
| private final ConfigurableBeanFactory configurableBeanFactory
| |
| expressionContext | back to summary |
|---|---|
| private final BeanExpressionContext expressionContext
| |
| namedValueInfoCache | back to summary |
|---|---|
| private final Map<MethodParameter, AbstractNamedValueArgumentResolver. | |
| AbstractNamedValueArgumentResolver | back to summary |
|---|---|
| public AbstractNamedValueArgumentResolver(ConfigurableBeanFactory factory, ReactiveAdapterRegistry registry) Create a new
| |
| applyConversion | back to summary |
|---|---|
| private Object applyConversion(Object value, AbstractNamedValueArgumentResolver. Apply type conversion if necessary.
| |
| createNamedValueInfo | back to summary |
|---|---|
| protected abstract AbstractNamedValueArgumentResolver. Create the
| |
| getDefaultValue | back to summary |
|---|---|
| private Mono Resolve the default value, if any. | |
| getNamedValueInfo | back to summary |
|---|---|
| private AbstractNamedValueArgumentResolver. Obtain the named value for the given method parameter. | |
| handleMissingValue | back to summary |
|---|---|
| protected void handleMissingValue(String name, MethodParameter parameter, ServerWebExchange exchange) Invoked when a named value is required, but
| |
| handleMissingValue | back to summary |
|---|---|
| protected void handleMissingValue(String name, MethodParameter parameter) Invoked when a named value is required, but
| |
| handleNullValue | back to summary |
|---|---|
| private Object handleNullValue(String name, Object value, Class<?> paramType) A
| |
| handleResolvedValue | back to summary |
|---|---|
| protected void handleResolvedValue(Object arg, String name, MethodParameter parameter, Model model, ServerWebExchange exchange) Invoked after a value is resolved.
| |
| resolveArgument | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Resolve the value for the method parameter.
| |
| resolveEmbeddedValuesAndExpressions | back to summary |
|---|---|
| private Object resolveEmbeddedValuesAndExpressions(String value) Resolve the given annotation-specified value, potentially containing placeholders and expressions.
| |
| resolveName | back to summary |
|---|---|
| protected abstract Mono Resolve the given parameter type and value name into an argument value.
| |
| updateNamedValueInfo | back to summary |
|---|---|
| private AbstractNamedValueArgumentResolver. Create a new NamedValueInfo based on the given NamedValueInfo with sanitized values. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static boolean | hasDefaultValue(MethodParameter parameter)
Check whether the specified |
| KotlinDelegate | back to summary |
|---|---|
| private KotlinDelegate() | |
| hasDefaultValue | back to summary |
|---|---|
| public static boolean hasDefaultValue(MethodParameter parameter) Check whether the specified | |
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | |
| private final boolean |
| Access | Constructor and Description |
|---|---|
| public |
| defaultValue | back to summary |
|---|---|
| private final String defaultValue
| |
| name | back to summary |
|---|---|
| private final String name | |
| required | back to summary |
|---|---|
| private final boolean required | |
| NamedValueInfo | back to summary |
|---|---|
| public NamedValueInfo(String name, boolean required, String defaultValue) | |