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
ConstructorsModifierConstructorDescriptionprotectedStdScalarDeserializer(Class<?> vc) protectedprotectedStdScalarDeserializer(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, isDefaultKeyDeserializerMethods 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:ValueDeserializerMethod 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:
logicalTypein classValueDeserializer<T>- Returns:
- Logical type of values this deserializer produces, if known;
nullif not
-
supportsUpdate
By default assumption is that scalar types cannot be updated: many are immutable values (such as primitives and wrappers)- Overrides:
supportsUpdatein classValueDeserializer<T>
-
getNullAccessPattern
Description copied from class:ValueDeserializerThis 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:
getNullAccessPatternin interfaceNullValueProvider- Overrides:
getNullAccessPatternin classValueDeserializer<T>
-
getEmptyAccessPattern
Description copied from class:ValueDeserializerThis 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:
getEmptyAccessPatternin classValueDeserializer<T>
-
deserializeWithType
public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws JacksonException Description copied from class:StdDeserializerBase 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:
deserializeWithTypein 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:
deserializein classValueDeserializer<T>- Throws:
JacksonException
-