Class Serializers.Base
- java.lang.Object
-
- com.fasterxml.jackson.databind.ser.Serializers.Base
-
- All Implemented Interfaces:
Serializers
- Direct Known Subclasses:
CoreXMLSerializers
,SimpleSerializers
- Enclosing interface:
- Serializers
public static class Serializers.Base extends Object implements Serializers
BasicSerializers
implementation that implements all methods but provides no serializers. Its main purpose is to serve as a base class so that sub-classes only need to override methods they need.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.fasterxml.jackson.databind.ser.Serializers
Serializers.Base
-
-
Constructor Summary
Constructors Constructor Description Base()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 likeCollection
, 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 specifiedCollection
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 likeMap
, 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 specifiedMap
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 givenReferenceType
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).
-
-
-
Method Detail
-
findSerializer
public JsonSerializer<?> findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc)
Description copied from interface:Serializers
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).- Specified by:
findSerializer
in interfaceSerializers
- Parameters:
config
- Serialization configuration in usetype
- Fully resolved type of instances to serializebeanDesc
- Additional information about type- Returns:
- Configured serializer to use for the type; or null if implementation does not recognize or support type
-
findReferenceSerializer
public JsonSerializer<?> findReferenceSerializer(SerializationConfig config, ReferenceType type, BeanDescription beanDesc, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for givenReferenceType
- Specified by:
findReferenceSerializer
in interfaceSerializers
-
findArraySerializer
public JsonSerializer<?> findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for specified array type. Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findArraySerializer
in interfaceSerializers
-
findCollectionSerializer
public JsonSerializer<?> findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for specifiedCollection
type. Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findCollectionSerializer
in interfaceSerializers
-
findCollectionLikeSerializer
public JsonSerializer<?> findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for specified "Collection-like" type (type that acts likeCollection
, but does not implement it). Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findCollectionLikeSerializer
in interfaceSerializers
-
findMapSerializer
public JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for specifiedMap
type. Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findMapSerializer
in interfaceSerializers
-
findMapLikeSerializer
public JsonSerializer<?> findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer)
Description copied from interface:Serializers
Method called by serialization framework first time a serializer is needed for specified "Map-like" type (type that acts likeMap
, but does not implement it). Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findMapLikeSerializer
in interfaceSerializers
-
-