Class Deserializers.Base

java.lang.Object
tools.jackson.databind.deser.Deserializers.Base
All Implemented Interfaces:
Deserializers
Direct Known Subclasses:
SimpleDeserializers
Enclosing interface:
Deserializers

public abstract static class Deserializers.Base extends Object implements Deserializers
Basic Deserializers implementation that implements all methods but provides no deserializers. Its main purpose is to serve as a base class so that sub-classes only need to override methods they need, as most of the time some of methods are not needed (especially enumeration and array deserializers are very rarely overridden).
  • Constructor Details

    • Base

      public Base()
  • Method Details

    • findEnumDeserializer

      public ValueDeserializer<?> findEnumDeserializer(Class<?> type, DeserializationConfig config, BeanDescription beanDesc)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified Enum type.
      Specified by:
      findEnumDeserializer in interface Deserializers
      Parameters:
      type - Type of Enum instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findTreeNodeDeserializer

      public ValueDeserializer<?> findTreeNodeDeserializer(Class<? extends JsonNode> nodeType, DeserializationConfig config, BeanDescription beanDesc)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified JSON tree node type.
      Specified by:
      findTreeNodeDeserializer in interface Deserializers
      Parameters:
      nodeType - Specific type of JSON tree nodes to deserialize (subtype of JsonNode)
      config - Configuration in effect
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findReferenceDeserializer

      public ValueDeserializer<?> findReferenceDeserializer(ReferenceType refType, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer contentTypeDeserializer, ValueDeserializer<?> contentDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for value that is of referential type,
      Specified by:
      findReferenceDeserializer in interface Deserializers
      Parameters:
      refType - Specific referential type to deserialize
      config - Configuration in effect
      beanDesc - Definition of the reference type that contains class annotations and other information typically needed for building deserializers
      contentTypeDeserializer - Possible type deserializer for referenced value
      contentDeserializer - Value deserializer to use for referenced value, if indicated by property annotation
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findBeanDeserializer

      public ValueDeserializer<?> findBeanDeserializer(JavaType type, DeserializationConfig config, BeanDescription beanDesc)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array, reference value or tree node)
      Specified by:
      findBeanDeserializer in interface Deserializers
      Parameters:
      type - Bean type to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findArrayDeserializer

      public ValueDeserializer<?> findArrayDeserializer(ArrayType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified array type.

      Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

      Specified by:
      findArrayDeserializer in interface Deserializers
      Parameters:
      type - Type of array instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      elementTypeDeserializer - If element type needs polymorphic type handling, this is the type information deserializer to use; should usually be used as is when constructing array deserializer.
      elementDeserializer - Deserializer to use for elements, if explicitly defined (by using annotations, for example). May be null, in which case it will need to be resolved by deserializer at a later point.
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findCollectionDeserializer

      public ValueDeserializer<?> findCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified Collection (List, Set etc) type.

      Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

      Specified by:
      findCollectionDeserializer in interface Deserializers
      Parameters:
      type - Type of collection instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      elementTypeDeserializer - If element type needs polymorphic type handling, this is the type information deserializer to use; should usually be used as is when constructing array deserializer.
      elementDeserializer - Deserializer to use for elements, if explicitly defined (by using annotations, for example). May be null, in which case it will need to be resolved by deserializer at a later point.
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findCollectionLikeDeserializer

      public ValueDeserializer<?> findCollectionLikeDeserializer(CollectionLikeType type, DeserializationConfig config, BeanDescription beanDesc, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified "Collection-like" type (one that acts like Collection but does not implement it).

      Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

      Specified by:
      findCollectionLikeDeserializer in interface Deserializers
      Parameters:
      type - Type of instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      elementTypeDeserializer - If element type needs polymorphic type handling, this is the type information deserializer to use; should usually be used as is when constructing array deserializer.
      elementDeserializer - Deserializer to use for elements, if explicitly defined (by using annotations, for example). May be null, in which case it will need to be resolved by deserializer at a later point.
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findMapDeserializer

      public ValueDeserializer<?> findMapDeserializer(MapType type, DeserializationConfig config, BeanDescription beanDesc, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified Map type.

      Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

      Similarly, a KeyDeserializer may be passed, but this is only done if there is a specific configuration override (annotations) to indicate instance to use. Otherwise null is passed, and key deserializer needs to be obtained later during resolution of map serializer constructed here.

      Specified by:
      findMapDeserializer in interface Deserializers
      Parameters:
      type - Type of Map instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      keyDeserializer - Key deserializer use, if it is defined via annotations or other configuration; null if default key deserializer for key type can be used.
      elementTypeDeserializer - If element type needs polymorphic type handling, this is the type information deserializer to use; should usually be used as is when constructing array deserializer.
      elementDeserializer - Deserializer to use for elements, if explicitly defined (by using annotations, for example). May be null, in which case it will need to be resolved by deserializer at a later point.
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it
    • findMapLikeDeserializer

      public ValueDeserializer<?> findMapLikeDeserializer(MapLikeType type, DeserializationConfig config, BeanDescription beanDesc, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)
      Description copied from interface: Deserializers
      Method called to locate deserializer for specified "Map-like" type (one that acts like Map but does not implement it).

      Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

      Similarly, a KeyDeserializer may be passed, but this is only done if there is a specific configuration override (annotations) to indicate instance to use. Otherwise null is passed, and key deserializer needs to be obtained later during resolution, by deserializer constructed here.

      Specified by:
      findMapLikeDeserializer in interface Deserializers
      Parameters:
      type - Type of Map instances to deserialize
      config - Configuration in effect
      beanDesc - Definition of the enumeration type that contains class annotations and other information typically needed for building deserializers
      keyDeserializer - Key deserializer use, if it is defined via annotations or other configuration; null if default key deserializer for key type can be used.
      elementTypeDeserializer - If element type needs polymorphic type handling, this is the type information deserializer to use; should usually be used as is when constructing array deserializer.
      elementDeserializer - Deserializer to use for elements, if explicitly defined (by using annotations, for example). May be null, in which case it will need to be resolved by deserializer at a later point.
      Returns:
      Deserializer to use for the type; or null if this provider does not know how to construct it