类 ModelMethodProcessor
java.lang.Object
cn.taketoday.web.bind.resolver.ModelMethodProcessor
- 所有已实现的接口:
ParameterResolvingStrategy,ReturnValueHandler
public class ModelMethodProcessor
extends Object
implements ReturnValueHandler, ParameterResolvingStrategy
Resolves
Model arguments and handles Model return values.
A Model return type has a set purpose. Therefore this handler
should be configured ahead of handlers that support any return value type
annotated with @ModelAttribute or @ResponseBody to ensure
they don't take over.
- 从以下版本开始:
- 4.0 2022/4/27 16:51
- 作者:
- Rossen Stoyanchev, Harry Yang
- 另请参阅:
-
RedirectModelModel
-
字段概要
从接口继承的字段 cn.taketoday.web.ReturnValueHandler
NONE_RETURN_VALUE -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidhandleReturnValue(RequestContext context, Object handler, Object returnValue) Handle result of the handlerresolveArgument(RequestContext context, ResolvableMethodParameter resolvable) Resolve parameterbooleansupportsHandler(Object handler) If thisReturnValueHandlersupports the target handlerbooleansupportsParameter(ResolvableMethodParameter resolvable) Whether the given parameter is supported by this resolver.booleansupportsReturnValue(Object returnValue) If thisReturnValueHandlersupports the target handler's result
-
构造器详细资料
-
ModelMethodProcessor
public ModelMethodProcessor()
-
-
方法详细资料
-
supportsParameter
从接口复制的说明:ParameterResolvingStrategyWhether the given parameter is supported by this resolver.static match
- 指定者:
supportsParameter在接口中ParameterResolvingStrategy
-
resolveArgument
@Nullable public Object resolveArgument(RequestContext context, ResolvableMethodParameter resolvable) throws Throwable 从接口复制的说明:ParameterResolvingStrategyResolve parameter- 指定者:
resolveArgument在接口中ParameterResolvingStrategy- 参数:
context- Current request contextresolvable- resolvable parameter- 返回:
- method parameter instance
- 抛出:
Throwable- if anyExceptionoccurred- 另请参阅:
-
supportsReturnValue
从接口复制的说明:ReturnValueHandlerIf thisReturnValueHandlersupports the target handler's resultThis method can test this
ReturnValueHandlersupports the target handler in application runtime- 指定者:
supportsReturnValue在接口中ReturnValueHandler- 参数:
returnValue- Target handler's return-value or result- 返回:
- If this
ReturnValueHandlersupports the target handler's result
-
supportsHandler
从接口复制的说明:ReturnValueHandlerIf thisReturnValueHandlersupports the target handlerThis method can test this
ReturnValueHandlersupports the target handler in application startup time , static match- 指定者:
supportsHandler在接口中ReturnValueHandler- 参数:
handler- Target HTTP handler- 返回:
- If this
ReturnValueHandlersupports the target handler
-
handleReturnValue
public void handleReturnValue(RequestContext context, Object handler, @Nullable Object returnValue) throws Exception 从接口复制的说明:ReturnValueHandlerHandle result of the handler- 指定者:
handleReturnValue在接口中ReturnValueHandler- 参数:
context- Current HTTP request contexthandler- Target HTTP handlerreturnValue- Handler execution result OrHandlerExceptionHandlerreturn value- 抛出:
Exception- return-value handled failed
-