Module tools.jackson.databind
Package tools.jackson.databind.deser.jdk
Class DateBasedDeserializer<T>
java.lang.Object
tools.jackson.databind.ValueDeserializer<T>
tools.jackson.databind.deser.std.StdDeserializer<T>
tools.jackson.databind.deser.std.StdScalarDeserializer<T>
tools.jackson.databind.deser.jdk.DateBasedDeserializer<T>
- All Implemented Interfaces:
NullValueProvider
,ValueInstantiator.Gettable
- Direct Known Subclasses:
JavaSqlDateDeserializer
,JavaSqlTimestampDeserializer
,JavaUtilCalendarDeserializer
,JavaUtilDateDeserializer
-
Nested Class Summary
Nested classes/interfaces inherited from class tools.jackson.databind.ValueDeserializer
ValueDeserializer.None
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final DateFormat
Specific format to use, if non-null; if null will just use default format.protected final String
Let's also keep format String for reference, to use for error messagesFields inherited from class tools.jackson.databind.deser.std.StdDeserializer
_valueClass, _valueType, F_MASK_INT_COERCIONS
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
DateBasedDeserializer
(Class<?> clz) protected
DateBasedDeserializer
(DateBasedDeserializer<T> base, DateFormat format, String formatStr) -
Method Summary
Modifier and TypeMethodDescriptionprotected Date
_parseDate
(JsonParser p, DeserializationContext ctxt) createContextual
(DeserializationContext ctxt, BeanProperty property) Method called to see if a different (or differently configured) deserializer is needed to deserialize values of specified property.Method for accessing logical type of values this deserializer produces.protected abstract DateBasedDeserializer<T>
withDateFormat
(DateFormat df, String formatStr) Methods inherited from class tools.jackson.databind.deser.std.StdScalarDeserializer
deserialize, deserializeWithType, getEmptyAccessPattern, getNullAccessPattern, supportsUpdate
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, _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
deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, resolve, unwrappingDeserializer
-
Field Details
-
_customFormat
Specific format to use, if non-null; if null will just use default format. -
_formatString
Let's also keep format String for reference, to use for error messages
-
-
Constructor Details
-
DateBasedDeserializer
-
DateBasedDeserializer
-
-
Method Details
-
withDateFormat
-
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 classStdScalarDeserializer<T>
- Returns:
- Logical type of values this deserializer produces, if known;
null
if not
-
createContextual
Description copied from class:ValueDeserializer
Method called to see if a different (or differently configured) deserializer is needed to deserialize values of specified property. Note that instance that this method is called on is typically shared one and as a result method should NOT modify this instance but rather construct and return a new instance. This instance should only be returned as-is, in case it is already suitable for use.- Overrides:
createContextual
in classValueDeserializer<T>
- Parameters:
ctxt
- Deserialization context to access configuration, additional deserializers that may be needed by this deserializerproperty
- Method, field or constructor parameter that represents the property (and is used to assign deserialized value). Should be available; but there may be cases where caller cannot provide it and null is passed instead (in which case impls usually pass 'this' deserializer as is)- Returns:
- Deserializer to use for deserializing values of specified property; may be this instance or a new instance.
-
_parseDate
- Overrides:
_parseDate
in classStdDeserializer<T>
- Throws:
JacksonException
-