Module tools.jackson.databind
Package tools.jackson.databind.deser.std
Class StdScalarDeserializer<T>
java.lang.Object
tools.jackson.databind.ValueDeserializer<T>
tools.jackson.databind.deser.std.StdDeserializer<T>
tools.jackson.databind.deser.std.StdScalarDeserializer<T>
- All Implemented Interfaces:
NullValueProvider
,ValueInstantiator.Gettable
- Direct Known Subclasses:
AtomicBooleanDeserializer
,AtomicIntegerDeserializer
,AtomicLongDeserializer
,BaseScalarOptionalDeserializer
,ByteBufferDeserializer
,DateBasedDeserializer
,DurationDeserializer
,EnumDeserializer
,FromStringDeserializer
,JSR310DateTimeDeserializerBase
,JSR310StringParsableDeserializer
,NumberDeserializers.BigDecimalDeserializer
,NumberDeserializers.BigIntegerDeserializer
,NumberDeserializers.NumberDeserializer
,NumberDeserializers.PrimitiveOrWrapperDeserializer
,StackTraceElementDeserializer
,StringDeserializer
,TokenBufferDeserializer
Base class for deserializers that handle types that are serialized
as JSON scalars (non-structured, i.e. non-Object, non-Array, values).
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer
ValueDeserializer.None
-
Field Summary
Fields inherited from class tools.jackson.databind.deser.std.StdDeserializer
_valueClass, _valueType, F_MASK_INT_COERCIONS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
StdScalarDeserializer
(Class<?> vc) protected
protected
StdScalarDeserializer
(JavaType valueType) -
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(JsonParser p, DeserializationContext ctxt, T intoValue) Overridden to simply calldeserialize()
method that does not take value to update, since scalar values are usually non-mergeable.deserializeWithType
(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) Base implementation that does not assume specific type inclusion mechanism.This method may be called in conjunction with calls toValueDeserializer.getEmptyValue(DeserializationContext)
, to check whether it needs to be called just once (static values), or each time empty value is needed.This method may be called in conjunction with calls toValueDeserializer.getNullValue(DeserializationContext)
, to check whether it needs to be called just once (static values), or each time empty value is needed.Method for accessing logical type of values this deserializer produces.supportsUpdate
(DeserializationConfig config) By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)Methods inherited from class tools.jackson.databind.deser.std.StdDeserializer
_byteOverflow, _checkBooleanToStringCoercion, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFloatToStringCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkIntToFloatCoercion, _checkIntToStringCoercion, _checkTextualNull, _checkToStringCoercion, _coerceBooleanFromInt, _coercedTypeDesc, _coercedTypeDesc, _coerceIntegral, _deserializeFromArray, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _wrapIOFailure, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer
Methods inherited from class tools.jackson.databind.ValueDeserializer
createContextual, deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, resolve, unwrappingDeserializer
-
Constructor Details
-
StdScalarDeserializer
-
StdScalarDeserializer
-
StdScalarDeserializer
-
-
Method Details
-
logicalType
Description copied from class:ValueDeserializer
Method for accessing logical type of values this deserializer produces. Typically used for further configuring handling of values, for example, to find which coercions are legal.- Overrides:
logicalType
in classValueDeserializer<T>
- Returns:
- Logical type of values this deserializer produces, if known;
null
if not
-
supportsUpdate
By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)- Overrides:
supportsUpdate
in classValueDeserializer<T>
-
getNullAccessPattern
Description copied from class:ValueDeserializer
This method may be called in conjunction with calls toValueDeserializer.getNullValue(DeserializationContext)
, to check whether it needs to be called just once (static values), or each time empty value is needed.Default implementation indicates that the "null value" to use for input null does not vary across uses so that
ValueDeserializer.getNullValue(DeserializationContext)
need not be called more than once per deserializer instance. This information may be used as optimization.- Specified by:
getNullAccessPattern
in interfaceNullValueProvider
- Overrides:
getNullAccessPattern
in classValueDeserializer<T>
-
getEmptyAccessPattern
Description copied from class:ValueDeserializer
This method may be called in conjunction with calls toValueDeserializer.getEmptyValue(DeserializationContext)
, to check whether it needs to be called just once (static values), or each time empty value is needed.- Overrides:
getEmptyAccessPattern
in classValueDeserializer<T>
-
deserializeWithType
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws JacksonException Description copied from class:StdDeserializer
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 classStdDeserializer<T>
typeDeserializer
- Deserializer to use for handling type information- Throws:
JacksonException
-
deserialize
public T deserialize(JsonParser p, DeserializationContext ctxt, T intoValue) throws JacksonException Overridden to simply calldeserialize()
method that does not take value to update, since scalar values are usually non-mergeable.- Overrides:
deserialize
in classValueDeserializer<T>
- Throws:
JacksonException
-