org.codehaus.jackson.map
Class DeserializerFactory

java.lang.Object
  extended by org.codehaus.jackson.map.DeserializerFactory
Direct Known Subclasses:
BasicDeserializerFactory

public abstract class DeserializerFactory
extends java.lang.Object

Abstract class that defines API used by DeserializerProvider to obtain actual JsonDeserializer instances from multiple distinct factories.

Since there are multiple broad categories of deserializers, there are multiple factory methods:

All above methods take 2 type arguments, except for the first one which takes just a single argument.


Constructor Summary
DeserializerFactory()
           
 
Method Summary
abstract  JsonDeserializer<?> createArrayDeserializer(DeserializationConfig config, ArrayType type, DeserializerProvider p)
          Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert Json content into values of specified Java type.
abstract  JsonDeserializer<java.lang.Object> createBeanDeserializer(DeserializationConfig config, JavaType type, DeserializerProvider p)
          Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert Json content into values of specified Java "bean" (POJO) type.
abstract  JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig config, CollectionType type, DeserializerProvider p)
           
abstract  JsonDeserializer<?> createEnumDeserializer(DeserializationConfig config, java.lang.Class<?> enumClass, DeserializerProvider p)
           
abstract  JsonDeserializer<?> createMapDeserializer(DeserializationConfig config, MapType type, DeserializerProvider p)
           
abstract  JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config, java.lang.Class<? extends JsonNode> nodeClass, DeserializerProvider p)
          Method called to create and return a deserializer that can construct JsonNode(s) from Json content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeserializerFactory

public DeserializerFactory()
Method Detail

createBeanDeserializer

public abstract JsonDeserializer<java.lang.Object> createBeanDeserializer(DeserializationConfig config,
                                                                          JavaType type,
                                                                          DeserializerProvider p)
                                                                   throws JsonMappingException
Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert Json content into values of specified Java "bean" (POJO) type. At this point it is known that the type is not otherwise recognized as one of structured types (array, Collection, Map) or a well-known JDK type (enum, primitives/wrappers, String); this method only gets called if other options are exhausted. This also means that this method can be overridden to add support for custom types.

Parameters:
type - Type to be deserialized
p - Provider that can be called to create deserializers for contained member types
Throws:
JsonMappingException

createArrayDeserializer

public abstract JsonDeserializer<?> createArrayDeserializer(DeserializationConfig config,
                                                            ArrayType type,
                                                            DeserializerProvider p)
                                                     throws JsonMappingException
Method called to create (or, for completely immutable deserializers, reuse) a deserializer that can convert Json content into values of specified Java type.

Parameters:
type - Type to be deserialized
p - Provider that can be called to create deserializers for contained member types
Throws:
JsonMappingException

createCollectionDeserializer

public abstract JsonDeserializer<?> createCollectionDeserializer(DeserializationConfig config,
                                                                 CollectionType type,
                                                                 DeserializerProvider p)
                                                          throws JsonMappingException
Throws:
JsonMappingException

createEnumDeserializer

public abstract JsonDeserializer<?> createEnumDeserializer(DeserializationConfig config,
                                                           java.lang.Class<?> enumClass,
                                                           DeserializerProvider p)
                                                    throws JsonMappingException
Throws:
JsonMappingException

createMapDeserializer

public abstract JsonDeserializer<?> createMapDeserializer(DeserializationConfig config,
                                                          MapType type,
                                                          DeserializerProvider p)
                                                   throws JsonMappingException
Throws:
JsonMappingException

createTreeDeserializer

public abstract JsonDeserializer<?> createTreeDeserializer(DeserializationConfig config,
                                                           java.lang.Class<? extends JsonNode> nodeClass,
                                                           DeserializerProvider p)
                                                    throws JsonMappingException
Method called to create and return a deserializer that can construct JsonNode(s) from Json content.

Throws:
JsonMappingException