org.springframework.messaging.handler.invocation.reactive

## Class HandlerMethodArgumentResolverComposite

- java.lang.Object
- - org.springframework.messaging.handler.invocation.reactive.HandlerMethodArgumentResolverComposite

All Implemented Interfaces:
  HandlerMethodArgumentResolver

    public class HandlerMethodArgumentResolverComposite
    extends Object
    implements HandlerMethodArgumentResolver

Resolves method parameters by delegating to a list of registered `HandlerMethodArgumentResolvers`. Previously resolved method parameters are cached for faster lookups.

Since:
  5.2
Author:
  Rossen Stoyanchev

### Field Summary

Fields
`protected Log` `logger`

### Constructor Summary

Constructors
Constructor and Description
`HandlerMethodArgumentResolverComposite()`

### Method Summary

All Methods Instance Methods Concrete Methods
`HandlerMethodArgumentResolverComposite` `addResolver(HandlerMethodArgumentResolver resolver)` Add the given `HandlerMethodArgumentResolver`.
`HandlerMethodArgumentResolverComposite` `addResolvers(HandlerMethodArgumentResolver... resolvers)` Add the given `HandlerMethodArgumentResolvers`.
`HandlerMethodArgumentResolverComposite` `addResolvers(List<? extends HandlerMethodArgumentResolver> resolvers)` Add the given `HandlerMethodArgumentResolvers`.
`void` `clear()` Clear the list of configured resolvers.
`HandlerMethodArgumentResolver` `getArgumentResolver(org.springframework.core.MethodParameter parameter)` Find a registered `HandlerMethodArgumentResolver` that supports the given method parameter.
`List<HandlerMethodArgumentResolver>` `getResolvers()` Return a read-only list with the contained resolvers, or an empty list.
`reactor.core.publisher.Mono<Object>` `resolveArgument(org.springframework.core.MethodParameter parameter, Message<?> message)` Iterate over registered `HandlerMethodArgumentResolvers` and invoke the one that supports it.
`boolean` `supportsParameter(org.springframework.core.MethodParameter parameter)` Whether the given method parameter is supported by any registered `HandlerMethodArgumentResolver`.

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

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

### Field Detail

#### logger

    protected final Log logger

### Constructor Detail

#### HandlerMethodArgumentResolverComposite

    public HandlerMethodArgumentResolverComposite()

### Method Detail

#### addResolver

    public HandlerMethodArgumentResolverComposite addResolver(HandlerMethodArgumentResolver resolver)

Add the given `HandlerMethodArgumentResolver`.

#### addResolvers

    public HandlerMethodArgumentResolverComposite addResolvers(@Nullable
                                                               HandlerMethodArgumentResolver... resolvers)

Add the given `HandlerMethodArgumentResolvers`.

#### addResolvers

    public HandlerMethodArgumentResolverComposite addResolvers(@Nullable
                                                               List<? extends HandlerMethodArgumentResolver> resolvers)

Add the given `HandlerMethodArgumentResolvers`.

#### getResolvers

    public List<HandlerMethodArgumentResolver> getResolvers()

Return a read-only list with the contained resolvers, or an empty list.

#### clear

    public void clear()

Clear the list of configured resolvers.

#### supportsParameter

    public boolean supportsParameter(org.springframework.core.MethodParameter parameter)

Whether the given method parameter is supported by any registered `HandlerMethodArgumentResolver`.

Specified by:
  `supportsParameter` in interface `HandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter to check
Returns:
  `true` if this resolver supports the supplied parameter; `false` otherwise

#### resolveArgument

    public reactor.core.publisher.Mono<Object> resolveArgument(org.springframework.core.MethodParameter parameter,
                                                               Message<?> message)

Iterate over registered `HandlerMethodArgumentResolvers` and invoke the one that supports it.

Specified by:
  `resolveArgument` in interface `HandlerMethodArgumentResolver`
Parameters:
  `parameter` - the method parameter to resolve. This parameter must have previously been passed to `HandlerMethodArgumentResolver.supportsParameter(org.springframework.core.MethodParameter)` which must have returned `true`.
  `message` - the currently processed message
Returns:
  `Mono` for the argument value, possibly empty
Throws:
  `IllegalStateException` - if no suitable `HandlerMethodArgumentResolver` is found.

#### getArgumentResolver

    @Nullable
    public HandlerMethodArgumentResolver getArgumentResolver(org.springframework.core.MethodParameter parameter)

Find a registered `HandlerMethodArgumentResolver` that supports the given method parameter.