public abstract class Jackson2CodecSupport extends Object
Modifier and Type | Field and Description |
---|---|
static 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 . |
protected Log |
logger |
Modifier | Constructor and Description |
---|---|
protected |
Jackson2CodecSupport(ObjectMapper objectMapper,
MimeType... mimeTypes)
Constructor with a Jackson
ObjectMapper to use. |
Modifier and Type | Method and Description |
---|---|
protected abstract <A extends Annotation> |
getAnnotation(MethodParameter parameter,
Class<A> annotType) |
protected Map<String,Object> |
getHints(ResolvableType resolvableType) |
protected JavaType |
getJavaType(Type type,
Class<?> contextClass) |
protected List<MimeType> |
getMimeTypes()
Subclasses should expose this as "decodable" or "encodable" mime types.
|
ObjectMapper |
getObjectMapper() |
protected MethodParameter |
getParameter(ResolvableType type) |
protected boolean |
supportsMimeType(MimeType mimeType) |
public static final String JSON_VIEW_HINT
Class
.protected final Log logger
protected Jackson2CodecSupport(ObjectMapper objectMapper, MimeType... mimeTypes)
ObjectMapper
to use.public ObjectMapper getObjectMapper()
protected List<MimeType> getMimeTypes()
protected Map<String,Object> getHints(ResolvableType resolvableType)
@Nullable protected MethodParameter getParameter(ResolvableType type)
@Nullable protected abstract <A extends Annotation> A getAnnotation(MethodParameter parameter, Class<A> annotType)