spring-framework / org.springframework.messaging.handler.annotation.support / AbstractNamedValueMethodArgumentResolver

AbstractNamedValueMethodArgumentResolver

abstract class AbstractNamedValueMethodArgumentResolver : HandlerMethodArgumentResolver

Abstract base class for resolving method arguments from a named value. Message headers, and path variables are examples of named values. Each may have a name, a required flag, and a default value.

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.

A ConversionService may be used to apply type conversion to the resolved argument value if it doesn't match the method parameter type.

Author
Rossen Stoyanchev

Author
Juergen Hoeller

Since
4.0

Functions

resolveArgument

open fun resolveArgument(parameter: MethodParameter, message: Message<*>): Any

Inherited Functions

supportsParameter

abstract fun supportsParameter(parameter: MethodParameter): Boolean

Whether the given MethodParameter is supported by this resolver.

Inheritors

DestinationVariableMethodArgumentResolver

open class DestinationVariableMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver

Resolves method parameters annotated with org.springframework.messaging.handler.annotation.DestinationVariable.

HeaderMethodArgumentResolver

open class HeaderMethodArgumentResolver : AbstractNamedValueMethodArgumentResolver

Resolves method parameters annotated with Header.