org.codehaus.jackson.map.jsontype.impl
Class TypeDeserializerBase

java.lang.Object
  extended by org.codehaus.jackson.map.TypeDeserializer
      extended by org.codehaus.jackson.map.jsontype.impl.TypeDeserializerBase
Direct Known Subclasses:
AsArrayTypeDeserializer, AsWrapperTypeDeserializer

public abstract class TypeDeserializerBase
extends TypeDeserializer

Since:
1.5
Author:
tatus

Field Summary
protected  JavaType _baseType
           
protected  HashMap<String,JsonDeserializer<Object>> _deserializers
          For efficient operation we will lazily build mappings from type ids to actual deserializers, once needed.
protected  TypeIdResolver _idResolver
           
 
Constructor Summary
protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes)
           
 
Method Summary
protected  JsonDeserializer<Object> _findDeserializer(DeserializationContext ctxt, String typeId)
           
 String baseTypeName()
           
 String getPropertyName()
          Name of property that contains type information, if property-based inclusion is used.
 TypeIdResolver getTypeIdResolver()
          Accessor for object that handles conversions between types and matching type ids.
abstract  JsonTypeInfo.As getTypeInclusion()
          Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.
 String toString()
           
 
Methods inherited from class org.codehaus.jackson.map.TypeDeserializer
deserializeTypedFromAny, deserializeTypedFromArray, deserializeTypedFromObject, deserializeTypedFromScalar
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

_idResolver

protected final TypeIdResolver _idResolver

_baseType

protected final JavaType _baseType

_deserializers

protected final HashMap<String,JsonDeserializer<Object>> _deserializers
For efficient operation we will lazily build mappings from type ids to actual deserializers, once needed.

Constructor Detail

TypeDeserializerBase

protected TypeDeserializerBase(JavaType baseType,
                               TypeIdResolver idRes)
Method Detail

getTypeInclusion

public abstract JsonTypeInfo.As getTypeInclusion()
Description copied from class: TypeDeserializer
Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.

Specified by:
getTypeInclusion in class TypeDeserializer

baseTypeName

public String baseTypeName()

getPropertyName

public String getPropertyName()
Description copied from class: TypeDeserializer
Name of property that contains type information, if property-based inclusion is used.

Specified by:
getPropertyName in class TypeDeserializer

getTypeIdResolver

public TypeIdResolver getTypeIdResolver()
Description copied from class: TypeDeserializer
Accessor for object that handles conversions between types and matching type ids.

Specified by:
getTypeIdResolver in class TypeDeserializer

toString

public String toString()
Overrides:
toString in class Object

_findDeserializer

protected final JsonDeserializer<Object> _findDeserializer(DeserializationContext ctxt,
                                                           String typeId)
                                                    throws IOException,
                                                           JsonProcessingException
Throws:
IOException
JsonProcessingException