public abstract class Jackson2CodecSupport
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JSON_VIEW_HINT
The key for the hint to specify a "JSON View" for encoding or decoding
with the value expected to be a
Class . |
Modifier | Constructor and Description |
---|---|
protected |
Jackson2CodecSupport(ObjectMapper objectMapper,
org.springframework.util.MimeType... mimeTypes)
Constructor with a Jackson
ObjectMapper to use. |
Modifier and Type | Method and Description |
---|---|
protected abstract <A extends java.lang.annotation.Annotation> |
getAnnotation(org.springframework.core.MethodParameter parameter,
java.lang.Class<A> annotType) |
protected java.util.Map<java.lang.String,java.lang.Object> |
getHints(org.springframework.core.ResolvableType resolvableType) |
protected JavaType |
getJavaType(java.lang.reflect.Type type,
java.lang.Class<?> contextClass) |
protected java.util.List<org.springframework.util.MimeType> |
getMimeTypes()
Subclasses should expose this as "decodable" or "encodable" mime types.
|
ObjectMapper |
getObjectMapper() |
protected org.springframework.core.MethodParameter |
getParameter(org.springframework.core.ResolvableType type) |
protected boolean |
supportsMimeType(org.springframework.util.MimeType mimeType) |
public static final java.lang.String JSON_VIEW_HINT
Class
.protected Jackson2CodecSupport(ObjectMapper objectMapper, org.springframework.util.MimeType... mimeTypes)
ObjectMapper
to use.public ObjectMapper getObjectMapper()
protected java.util.List<org.springframework.util.MimeType> getMimeTypes()
protected boolean supportsMimeType(@Nullable org.springframework.util.MimeType mimeType)
protected JavaType getJavaType(java.lang.reflect.Type type, @Nullable java.lang.Class<?> contextClass)
protected java.util.Map<java.lang.String,java.lang.Object> getHints(org.springframework.core.ResolvableType resolvableType)
@Nullable protected org.springframework.core.MethodParameter getParameter(org.springframework.core.ResolvableType type)
@Nullable protected abstract <A extends java.lang.annotation.Annotation> A getAnnotation(org.springframework.core.MethodParameter parameter, java.lang.Class<A> annotType)