HandlerMethod that invokes the underlying method with
argument values resolved from the current HTTP request through a list of
HandlerMethodArgumentResolver.
| Modifier and Type | Class and Description |
|---|---|
| private static class | InvocableHandlerMethod.
Inner class to avoid a hard dependency on Kotlin at runtime. |
| Modifier and Type | Field and Description |
|---|---|
| private static final ReflectionUtils. | |
| private WebDataBinderFactory | |
| private static final Object[] | |
| private static final Class | |
| private MethodValidator | |
| private ParameterNameDiscoverer | |
| private HandlerMethodArgumentResolverComposite | |
| private Class |
| Access | Constructor and Description |
|---|---|
| public | |
| public | InvocableHandlerMethod(Object bean, Method method)
Create an instance from a bean instance and a method. |
| protected | InvocableHandlerMethod(Object bean, Method method, MessageSource messageSource)
Variant of |
| public | InvocableHandlerMethod(Object
the object bean bean, String the method name methodName, Class<?>... the method parameter types parameterTypes)Construct a new handler method with the given bean instance, method name and parameters. |
| Modifier and Type | Method and Description |
|---|---|
| protected Object | |
| protected Object[] | getMethodArgumentValues(NativeWebRequest request, ModelAndViewContainer mavContainer, Object... providedArgs)
Get the method argument values for the current request, checking the provided argument values and falling back to the configured argument resolvers. |
| public Object | Returns: the raw value returned by the invoked methodthe current request request, ModelAndViewContainer the ModelAndViewContainer for this request mavContainer, Object... "given" arguments matched by type, not resolved providedArgs)Invoke the method after resolving its argument values in the context of the given request. |
| protected Object | invokeSuspendingFunction(Method method, Object target, Object[] args)
Invoke the given Kotlin coroutine suspended function. |
| public void | setDataBinderFactory(WebDataBinderFactory dataBinderFactory)
Set the |
| public void | setHandlerMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers)
Set |
| public void | setMethodValidator(MethodValidator methodValidator)
Set the |
| public void | setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDiscoverer)
Set the ParameterNameDiscoverer for resolving parameter names when needed (e.g. default request attribute name). |
| boxImplFilter | back to summary |
|---|---|
| private static final ReflectionUtils. | |
| dataBinderFactory | back to summary |
|---|---|
| private WebDataBinderFactory dataBinderFactory
| |
| EMPTY_ARGS | back to summary |
|---|---|
| private static final Object[] EMPTY_ARGS | |
| EMPTY_GROUPS | back to summary |
|---|---|
| private static final Class<?>[] EMPTY_GROUPS | |
| methodValidator | back to summary |
|---|---|
| private MethodValidator methodValidator
| |
| parameterNameDiscoverer | back to summary |
|---|---|
| private ParameterNameDiscoverer parameterNameDiscoverer | |
| resolvers | back to summary |
|---|---|
| private HandlerMethodArgumentResolverComposite resolvers | |
| validationGroups | back to summary |
|---|---|
| private Class<?>[] validationGroups | |
| InvocableHandlerMethod | back to summary |
|---|---|
| public InvocableHandlerMethod(HandlerMethod handlerMethod) Create an instance from a | |
| InvocableHandlerMethod | back to summary |
|---|---|
| public InvocableHandlerMethod(Object bean, Method method) Create an instance from a bean instance and a method. | |
| InvocableHandlerMethod | back to summary |
|---|---|
| protected InvocableHandlerMethod(Object bean, Method method, MessageSource messageSource) Variant of
| |
| InvocableHandlerMethod | back to summary |
|---|---|
| public InvocableHandlerMethod(Object bean, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException Construct a new handler method with the given bean instance, method name and parameters.
| |
| doInvoke | back to summary |
|---|---|
| protected Object doInvoke(Object... args) throws Exception Invoke the handler method with the given argument values.
| |
| getMethodArgumentValues | back to summary |
|---|---|
| protected Object[] getMethodArgumentValues(NativeWebRequest request, ModelAndViewContainer mavContainer, Object... providedArgs) throws Exception Get the method argument values for the current request, checking the provided argument values and falling back to the configured argument resolvers. The resulting array will be passed into
| |
| invokeForRequest | back to summary |
|---|---|
| public Object invokeForRequest(NativeWebRequest request, ModelAndViewContainer mavContainer, Object... providedArgs) throws Exception Invoke the method after resolving its argument values in the context of the given request. Argument values are commonly resolved through
Delegates to
| |
| invokeSuspendingFunction | back to summary |
|---|---|
| protected Object invokeSuspendingFunction(Method method, Object target, Object[] args) Invoke the given Kotlin coroutine suspended function. The default implementation invokes
| |
| setDataBinderFactory | back to summary |
|---|---|
| public void setDataBinderFactory(WebDataBinderFactory dataBinderFactory) Set the | |
| setHandlerMethodArgumentResolvers | back to summary |
|---|---|
| public void setHandlerMethodArgumentResolvers(HandlerMethodArgumentResolverComposite argumentResolvers) Set | |
| setMethodValidator | back to summary |
|---|---|
| public void setMethodValidator(MethodValidator methodValidator) Set the
| |
| setParameterNameDiscoverer | back to summary |
|---|---|
| public void setParameterNameDiscoverer(ParameterNameDiscoverer parameterNameDiscoverer) Set the ParameterNameDiscoverer for resolving parameter names when needed (e.g. default request attribute name). Default is a | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Object |
| KotlinDelegate | back to summary |
|---|---|
| private KotlinDelegate() | |
| invokeFunction | back to summary |
|---|---|
public static Object invokeFunction(Method method, Object target, Object[] args) throws InvocationTargetException, IllegalAccessException
| |