com.fasterxml.jackson.databind.ser
Class Serializers.Base

java.lang.Object
  extended by com.fasterxml.jackson.databind.ser.Serializers.Base
All Implemented Interfaces:
Serializers
Direct Known Subclasses:
SimpleSerializers
Enclosing interface:
Serializers

public static class Serializers.Base
extends Object
implements 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
Serializers.Base()
           
 
Method Summary
 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<?> 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 type (for which other methods are called).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Serializers.Base

public Serializers.Base()
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 type (for which other methods are called).

Specified by:
findSerializer in interface Serializers
Parameters:
config - Serialization configuration in use
type - Fully resolved type of instances to serialize
beanDesc - Additional information about type
Returns:
Configured serializer to use for the type; or null if implementation does not recognize or support type

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 interface Serializers

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 specified Collection type. Implementation should return a serializer instance if it supports specified type; or null if it does not.

Specified by:
findCollectionSerializer in interface Serializers

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 like Collection, 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 interface Serializers

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 specified Map type. Implementation should return a serializer instance if it supports specified type; or null if it does not.

Specified by:
findMapSerializer in interface Serializers

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 like Map, 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 interface Serializers


Copyright © 2012 fasterxml.com. All Rights Reserved.