public class HandlerMethodArgumentResolverComposite extends Object implements HandlerMethodArgumentResolver
HandlerMethodArgumentResolver
. Previously resolved method parameters are cached
for faster lookups.Constructor and Description |
---|
HandlerMethodArgumentResolverComposite() |
Modifier and Type | Method and Description |
---|---|
HandlerMethodArgumentResolverComposite |
addResolver(HandlerMethodArgumentResolver argumentResolver)
Add the given
HandlerMethodArgumentResolver . |
HandlerMethodArgumentResolverComposite |
addResolvers(List<? extends HandlerMethodArgumentResolver> argumentResolvers)
Add the given
HandlerMethodArgumentResolver s. |
void |
clear()
Clear the list of configured resolvers.
|
List<HandlerMethodArgumentResolver> |
getResolvers()
Return a read-only list with the contained resolvers, or an empty list.
|
Object |
resolveArgument(MethodParameter parameter,
Message<?> message)
Iterate over registered
HandlerMethodArgumentResolver s and invoke the one that supports it. |
boolean |
supportsParameter(MethodParameter parameter)
Whether the given method parameter is supported by any registered
HandlerMethodArgumentResolver . |
public HandlerMethodArgumentResolverComposite()
public HandlerMethodArgumentResolverComposite addResolver(HandlerMethodArgumentResolver argumentResolver)
HandlerMethodArgumentResolver
.public HandlerMethodArgumentResolverComposite addResolvers(List<? extends HandlerMethodArgumentResolver> argumentResolvers)
HandlerMethodArgumentResolver
s.public List<HandlerMethodArgumentResolver> getResolvers()
public void clear()
public boolean supportsParameter(MethodParameter parameter)
HandlerMethodArgumentResolver
.supportsParameter
in interface HandlerMethodArgumentResolver
parameter
- the method parameter to checktrue
if this resolver supports the supplied parameter;
false
otherwisepublic Object resolveArgument(MethodParameter parameter, Message<?> message) throws Exception
HandlerMethodArgumentResolver
s and invoke the one that supports it.resolveArgument
in interface HandlerMethodArgumentResolver
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 messagenull
IllegalStateException
- if no suitable HandlerMethodArgumentResolver
is found.Exception
- in case of errors with the preparation of argument values