List of usage examples for org.springframework.web.method.support HandlerMethodReturnValueHandler supportsReturnType
boolean supportsReturnType(MethodParameter returnType);
From source file:org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.java
@Nullable private HandlerMethodReturnValueHandler getReturnValueHandler(MethodParameter returnType) { for (HandlerMethodReturnValueHandler handler : this.returnValueHandlers) { if (handler.supportsReturnType(returnType)) { return handler; }//from ww w . jav a2s . c om } return null; }
From source file:org.springframework.web.method.support.HandlerMethodReturnValueHandlerComposite.java
@Nullable private HandlerMethodReturnValueHandler selectHandler(@Nullable Object value, MethodParameter returnType) { boolean isAsyncValue = isAsyncReturnValue(value, returnType); for (HandlerMethodReturnValueHandler handler : this.returnValueHandlers) { if (isAsyncValue && !(handler instanceof AsyncHandlerMethodReturnValueHandler)) { continue; }//from ww w . ja v a 2 s . c o m if (handler.supportsReturnType(returnType)) { return handler; } } return null; }