public interface Serializers
JsonSerializer
for specified type, or null to indicate that it
does not support handling of the type. In latter case, further calls can be made
for other providers; in former case returned serializer is used for handling of
instances of specified type.Modifier and Type | Interface and Description |
---|---|
static class |
Serializers.Base
Basic
Serializers implementation that implements all methods but provides
no serializers. |
Modifier and Type | Method and Description |
---|---|
JsonSerializer<?> |
findArraySerializer(SerializationConfig config,
ArrayType type,
BeanDescription beanDesc,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified array type.
|
JsonSerializer<?> |
findCollectionLikeSerializer(SerializationConfig config,
CollectionLikeType type,
BeanDescription beanDesc,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified "Collection-like" type (type that acts like
Collection ,
but does not implement it). |
JsonSerializer<?> |
findCollectionSerializer(SerializationConfig config,
CollectionType type,
BeanDescription beanDesc,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified
Collection type. |
JsonSerializer<?> |
findMapLikeSerializer(SerializationConfig config,
MapLikeType type,
BeanDescription beanDesc,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified "Map-like" type (type that acts like
Map ,
but does not implement it). |
JsonSerializer<?> |
findMapSerializer(SerializationConfig config,
MapType type,
BeanDescription beanDesc,
JsonSerializer<Object> keySerializer,
TypeSerializer elementTypeSerializer,
JsonSerializer<Object> elementValueSerializer)
Method called by serialization framework first time a serializer is needed for
specified
Map type. |
JsonSerializer<?> |
findReferenceSerializer(SerializationConfig config,
ReferenceType type,
BeanDescription beanDesc,
TypeSerializer contentTypeSerializer,
JsonSerializer<Object> contentValueSerializer)
Method called by serialization framework first time a serializer is needed for
given
ReferenceType |
JsonSerializer<?> |
findSerializer(SerializationConfig config,
JavaType type,
BeanDescription beanDesc)
Method called by serialization framework first time a serializer is needed for
specified type, which is not of a container or reference type (for which
other methods are called).
|
JsonSerializer<?> findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc)
type
- Fully resolved type of instances to serializeconfig
- Serialization configuration in usebeanDesc
- Additional information about typeJsonSerializer<?> findReferenceSerializer(SerializationConfig config, ReferenceType type, BeanDescription beanDesc, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentValueSerializer)
ReferenceType
JsonSerializer<?> findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
JsonSerializer<?> findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Collection
type.
Implementation should return a serializer instance if it supports
specified type; or null if it does not.JsonSerializer<?> findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Collection
,
but does not implement it).
Implementation should return a serializer instance if it supports
specified type; or null if it does not.JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Map
type.
Implementation should return a serializer instance if it supports
specified type; or null if it does not.JsonSerializer<?> findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Map
,
but does not implement it).
Implementation should return a serializer instance if it supports
specified type; or null if it does not.Copyright © 2018 JBoss by Red Hat. All rights reserved.