Class StdDeserializer<T>
- java.lang.Object
-
- com.fasterxml.jackson.databind.JsonDeserializer<T>
-
- com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
-
- All Implemented Interfaces:
NullValueProvider
,ValueInstantiator.Gettable
,Serializable
- Direct Known Subclasses:
BeanDeserializerBase
,ContainerDeserializerBase
,DelegatingDeserializer
,EnumSetDeserializer
,FailingDeserializer
,JsonNodeDeserializer
,NullifyingDeserializer
,PrimitiveArrayDeserializers
,ReferenceTypeDeserializer
,StdDelegatingDeserializer
,StdNodeBasedDeserializer
,StdScalarDeserializer
,StringArrayDeserializer
,UnsupportedTypeDeserializer
,UntypedObjectDeserializer
,UntypedObjectDeserializer.Vanilla
public abstract class StdDeserializer<T> extends JsonDeserializer<T> implements Serializable, ValueInstantiator.Gettable
Base class for common deserializers. Contains shared base functionality for dealing with primitive values, such as (re)parsing from String.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
JsonDeserializer.None
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Object
deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer)
Base implementation that does not assume specific type inclusion mechanism.Class<?>
getValueClass()
Deprecated.Since 2.3 usehandledType()
insteadValueInstantiator
getValueInstantiator()
JavaType
getValueType()
Exact structured type this deserializer handles, if known.JavaType
getValueType(DeserializationContext ctxt)
Convenience method for getting handled type asJavaType
, regardless of whether deserializer has one already resolved (and accessible viagetValueType()
) or not: equivalent to:Class<?>
handledType()
Method for accessing concrete physical type of values this deserializer produces.-
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, logicalType, replaceDelegatee, supportsUpdate, unwrappingDeserializer
-
-
-
-
Method Detail
-
handledType
public Class<?> handledType()
Description copied from class:JsonDeserializer
Method for accessing concrete physical type of values this deserializer produces. Note that this information is not guaranteed to be exact -- it may be a more generic (super-type) -- but it should not be incorrect (return a non-related type).Default implementation will return null, which means almost same same as returning
Object.class
would; that is, that nothing is known about handled type.- Overrides:
handledType
in classJsonDeserializer<T>
- Returns:
- Physical type of values this deserializer produces, if known;
null
if not
-
getValueClass
@Deprecated public final Class<?> getValueClass()
Deprecated.Since 2.3 usehandledType()
instead
-
getValueType
public JavaType getValueType()
Exact structured type this deserializer handles, if known.
-
getValueType
public JavaType getValueType(DeserializationContext ctxt)
Convenience method for getting handled type asJavaType
, regardless of whether deserializer has one already resolved (and accessible viagetValueType()
) or not: equivalent to:if (getValueType() != null) { return getValueType(); } return ctxt.constructType(handledType());
- Since:
- 2.10
-
getValueInstantiator
public ValueInstantiator getValueInstantiator()
- Specified by:
getValueInstantiator
in interfaceValueInstantiator.Gettable
- Since:
- 2.12
-
deserializeWithType
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException
Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.- Overrides:
deserializeWithType
in classJsonDeserializer<T>
typeDeserializer
- Deserializer to use for handling type information- Throws:
IOException
-
-