public abstract class AbstractMessageConverterMethodArgumentResolver extends java.lang.Object implements HandlerMethodArgumentResolver
HttpMessageConverters.| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<MediaType> |
allSupportedMediaTypes |
protected Log |
logger |
protected java.util.List<HttpMessageConverter<?>> |
messageConverters |
| Constructor and Description |
|---|
AbstractMessageConverterMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> messageConverters) |
| Modifier and Type | Method and Description |
|---|---|
protected ServletServerHttpRequest |
createInputMessage(NativeWebRequest webRequest)
Creates a new
HttpInputMessage from the given NativeWebRequest. |
protected <T> java.lang.Object |
readWithMessageConverters(HttpInputMessage inputMessage,
MethodParameter methodParam,
java.lang.reflect.Type targetType)
Creates the method argument value of the expected parameter type by reading
from the given HttpInputMessage.
|
protected <T> java.lang.Object |
readWithMessageConverters(NativeWebRequest webRequest,
MethodParameter methodParam,
java.lang.reflect.Type paramType)
Creates the method argument value of the expected parameter type by
reading from the given request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitresolveArgument, supportsParameterprotected final Log logger
protected final java.util.List<HttpMessageConverter<?>> messageConverters
protected final java.util.List<MediaType> allSupportedMediaTypes
public AbstractMessageConverterMethodArgumentResolver(java.util.List<HttpMessageConverter<?>> messageConverters)
protected <T> java.lang.Object readWithMessageConverters(NativeWebRequest webRequest, MethodParameter methodParam, java.lang.reflect.Type paramType) throws java.io.IOException, HttpMediaTypeNotSupportedException
T - the expected type of the argument value to be createdwebRequest - the current requestmethodParam - the method argumentparamType - the type of the argument value to be createdjava.io.IOException - if the reading from the request failsHttpMediaTypeNotSupportedException - if no suitable message converter is foundprotected <T> java.lang.Object readWithMessageConverters(HttpInputMessage inputMessage, MethodParameter methodParam, java.lang.reflect.Type targetType) throws java.io.IOException, HttpMediaTypeNotSupportedException
T - the expected type of the argument value to be createdinputMessage - the HTTP input message representing the current requestmethodParam - the method argumenttargetType - the type of object to create, not necessarily the same as
the method parameter type (e.g. for HttpEntity<String> method
parameter the target type is String)java.io.IOException - if the reading from the request failsHttpMediaTypeNotSupportedException - if no suitable message converter is foundprotected ServletServerHttpRequest createInputMessage(NativeWebRequest webRequest)
HttpInputMessage from the given NativeWebRequest.webRequest - the web request to create an input message from