Class TypeDeserializerBase
- java.lang.Object
-
- org.codehaus.jackson.map.TypeDeserializer
-
- 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
Fields Modifier and Type Field Description protected JavaType_baseTypeprotected JavaType_defaultImplType to use as the default implementation, if type id is missing or can not be resolved.protected JsonDeserializer<Object>_defaultImplDeserializerprotected HashMap<String,JsonDeserializer<Object>>_deserializersFor efficient operation we will lazily build mappings from type ids to actual deserializers, once needed.protected TypeIdResolver_idResolverprotected BeanProperty_property
-
Constructor Summary
Constructors Modifier Constructor Description protectedTypeDeserializerBase(JavaType baseType, TypeIdResolver idRes, BeanProperty property)Deprecated.Since 1.9, use the constructor that takes 'defaultImpl'protectedTypeDeserializerBase(JavaType baseType, TypeIdResolver idRes, BeanProperty property, Class<?> defaultImpl)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected JsonDeserializer<Object>_findDefaultImplDeserializer(DeserializationContext ctxt)protected JsonDeserializer<Object>_findDeserializer(DeserializationContext ctxt, String typeId)StringbaseTypeName()Class<?>getDefaultImpl()Accessor for "default implementation" type; optionally defined class to use in cases where type id is not accessible for some reason (either missing, or can not be resolved)StringgetPropertyName()Name of property that contains type information, if property-based inclusion is used.TypeIdResolvergetTypeIdResolver()Accessor for object that handles conversions between types and matching type ids.abstract JsonTypeInfo.AsgetTypeInclusion()Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.StringtoString()-
Methods inherited from class org.codehaus.jackson.map.TypeDeserializer
deserializeTypedFromAny, deserializeTypedFromArray, deserializeTypedFromObject, deserializeTypedFromScalar
-
-
-
-
Field Detail
-
_idResolver
protected final TypeIdResolver _idResolver
-
_baseType
protected final JavaType _baseType
-
_property
protected final BeanProperty _property
-
_defaultImpl
protected final JavaType _defaultImpl
Type to use as the default implementation, if type id is missing or can not be resolved.- Since:
- 1.9
-
_deserializers
protected final HashMap<String,JsonDeserializer<Object>> _deserializers
For efficient operation we will lazily build mappings from type ids to actual deserializers, once needed.
-
_defaultImplDeserializer
protected JsonDeserializer<Object> _defaultImplDeserializer
- Since:
- 1.9
-
-
Constructor Detail
-
TypeDeserializerBase
@Deprecated protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes, BeanProperty property)
Deprecated.Since 1.9, use the constructor that takes 'defaultImpl'
-
TypeDeserializerBase
protected TypeDeserializerBase(JavaType baseType, TypeIdResolver idRes, BeanProperty property, Class<?> defaultImpl)
-
-
Method Detail
-
getTypeInclusion
public abstract JsonTypeInfo.As getTypeInclusion()
Description copied from class:TypeDeserializerAccessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.- Specified by:
getTypeInclusionin classTypeDeserializer
-
baseTypeName
public String baseTypeName()
-
getPropertyName
public String getPropertyName()
Description copied from class:TypeDeserializerName of property that contains type information, if property-based inclusion is used.- Specified by:
getPropertyNamein classTypeDeserializer
-
getTypeIdResolver
public TypeIdResolver getTypeIdResolver()
Description copied from class:TypeDeserializerAccessor for object that handles conversions between types and matching type ids.- Specified by:
getTypeIdResolverin classTypeDeserializer
-
getDefaultImpl
public Class<?> getDefaultImpl()
Description copied from class:TypeDeserializerAccessor for "default implementation" type; optionally defined class to use in cases where type id is not accessible for some reason (either missing, or can not be resolved)- Specified by:
getDefaultImplin classTypeDeserializer
-
_findDeserializer
protected final JsonDeserializer<Object> _findDeserializer(DeserializationContext ctxt, String typeId) throws IOException, JsonProcessingException
- Throws:
IOExceptionJsonProcessingException
-
_findDefaultImplDeserializer
protected final JsonDeserializer<Object> _findDefaultImplDeserializer(DeserializationContext ctxt) throws IOException, JsonProcessingException
- Throws:
IOExceptionJsonProcessingException
-
-