Module tools.jackson.databind
Package tools.jackson.databind.ext.jdk8
Class Jdk8OptionalDeserializer
java.lang.Object
tools.jackson.databind.ValueDeserializer<T>
tools.jackson.databind.deser.std.StdDeserializer<T>
tools.jackson.databind.deser.std.ReferenceTypeDeserializer<Optional<?>>
tools.jackson.databind.ext.jdk8.Jdk8OptionalDeserializer
- All Implemented Interfaces:
NullValueProvider,ValueInstantiator.Gettable
-
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.ReferenceTypeDeserializer
_fullType, _valueDeserializer, _valueInstantiator, _valueTypeDeserializerFields inherited from class tools.jackson.databind.deser.std.StdDeserializer
_valueClass, _valueType, F_MASK_INT_COERCIONS -
Constructor Summary
ConstructorsConstructorDescriptionJdk8OptionalDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, ValueDeserializer<?> deser) -
Method Summary
Modifier and TypeMethodDescriptionOptional<?>Method that can be called to determine value to be used for representing null values (values deserialized when JSON token isJsonToken.VALUE_NULL).getReferenced(Optional<?> reference) Method that may be called to find contents of specified reference, if any; or `null` if none.Optional<?>referenceValue(Object contents) Optional<?>updateReference(Optional<?> reference, Object contents) Method called in case of "merging update", in which we should try update reference instead of creating a new one.withResolved(TypeDeserializer typeDeser, ValueDeserializer<?> valueDeser) Mutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.Methods inherited from class tools.jackson.databind.deser.std.ReferenceTypeDeserializer
createContextual, deserialize, deserialize, deserializeWithType, getAbsentValue, getEmptyAccessPattern, getEmptyValue, getNullAccessPattern, getValueInstantiator, getValueType, logicalType, supportsUpdateMethods 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, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializerMethods inherited from class tools.jackson.databind.ValueDeserializer
deserializeWithType, findBackReference, getDelegatee, getKnownPropertyNames, getObjectIdReader, isCachable, replaceDelegatee, resolve, unwrappingDeserializer
-
Constructor Details
-
Jdk8OptionalDeserializer
public Jdk8OptionalDeserializer(JavaType fullType, ValueInstantiator inst, TypeDeserializer typeDeser, ValueDeserializer<?> deser)
-
-
Method Details
-
withResolved
public Jdk8OptionalDeserializer withResolved(TypeDeserializer typeDeser, ValueDeserializer<?> valueDeser) Description copied from class:ReferenceTypeDeserializerMutant factory method called when changes are needed; should construct newly configured instance with new values as indicated.NOTE: caller has verified that there are changes, so implementations need NOT check if a new instance is needed.
- Specified by:
withResolvedin classReferenceTypeDeserializer<Optional<?>>
-
getNullValue
Description copied from class:ValueDeserializerMethod that can be called to determine value to be used for representing null values (values deserialized when JSON token isJsonToken.VALUE_NULL). Usually this is simply Java null, but for some types (especially primitives) it may be necessary to use non-null values.This method may be called once, or multiple times, depending on what
ValueDeserializer.getNullAccessPattern()returns.Default implementation simply returns null.
- Specified by:
getNullValuein interfaceNullValueProvider- Specified by:
getNullValuein classReferenceTypeDeserializer<Optional<?>>
-
referenceValue
- Specified by:
referenceValuein classReferenceTypeDeserializer<Optional<?>>
-
getReferenced
Description copied from class:ReferenceTypeDeserializerMethod that may be called to find contents of specified reference, if any; or `null` if none. Note that method should never fail, so for types that use concept of "absence" vs "presence", `null` is to be returned for both "absent" and "reference to `null`" cases.- Specified by:
getReferencedin classReferenceTypeDeserializer<Optional<?>>
-
updateReference
Description copied from class:ReferenceTypeDeserializerMethod called in case of "merging update", in which we should try update reference instead of creating a new one. If this does not succeed, should just create a new instance.- Specified by:
updateReferencein classReferenceTypeDeserializer<Optional<?>>
-