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
Basic
Serializers 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 -
Method Summary
Modifier and TypeMethodDescriptionfindArraySerializer(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.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).findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Method called by serialization framework first time a serializer is needed for specifiedCollectiontype.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).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 specifiedMaptype.findReferenceSerializer(SerializationConfig config, ReferenceType type, BeanDescription beanDesc, TypeSerializer contentTypeSerializer, JsonSerializer<Object> contentValueSerializer) Method called by serialization framework first time a serializer is needed for givenReferenceTypefindSerializer(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).
-
Constructor Details
-
Base
public Base()
-
-
Method Details
-
findSerializer
public JsonSerializer<?> findSerializer(SerializationConfig config, JavaType type, BeanDescription beanDesc) Description copied from interface:SerializersMethod 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:
findSerializerin 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:SerializersMethod called by serialization framework first time a serializer is needed for givenReferenceType- Specified by:
findReferenceSerializerin interfaceSerializers
-
findArraySerializer
public JsonSerializer<?> findArraySerializer(SerializationConfig config, ArrayType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Description copied from interface:SerializersMethod 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:
findArraySerializerin interfaceSerializers
-
findCollectionSerializer
public JsonSerializer<?> findCollectionSerializer(SerializationConfig config, CollectionType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Description copied from interface:SerializersMethod called by serialization framework first time a serializer is needed for specifiedCollectiontype. Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findCollectionSerializerin interfaceSerializers
-
findCollectionLikeSerializer
public JsonSerializer<?> findCollectionLikeSerializer(SerializationConfig config, CollectionLikeType type, BeanDescription beanDesc, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Description copied from interface:SerializersMethod 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:
findCollectionLikeSerializerin interfaceSerializers
-
findMapSerializer
public JsonSerializer<?> findMapSerializer(SerializationConfig config, MapType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Description copied from interface:SerializersMethod called by serialization framework first time a serializer is needed for specifiedMaptype. Implementation should return a serializer instance if it supports specified type; or null if it does not.- Specified by:
findMapSerializerin interfaceSerializers
-
findMapLikeSerializer
public JsonSerializer<?> findMapLikeSerializer(SerializationConfig config, MapLikeType type, BeanDescription beanDesc, JsonSerializer<Object> keySerializer, TypeSerializer elementTypeSerializer, JsonSerializer<Object> elementValueSerializer) Description copied from interface:SerializersMethod 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:
findMapLikeSerializerin interfaceSerializers
-