com.fasterxml.jackson.databind.deser.std

## Class NumberDeserializers.PrimitiveOrWrapperDeserializer<T>

- java.lang.Object
- - com.fasterxml.jackson.databind.JsonDeserializer<T>
  - - com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
    - - com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer<T>
      - - com.fasterxml.jackson.databind.deser.std.NumberDeserializers.PrimitiveOrWrapperDeserializer<T>

All Implemented Interfaces:
  NullValueProvider, ValueInstantiator.Gettable, Serializable

Direct Known Subclasses:
  NumberDeserializers.BooleanDeserializer, NumberDeserializers.ByteDeserializer, NumberDeserializers.CharacterDeserializer, NumberDeserializers.DoubleDeserializer, NumberDeserializers.FloatDeserializer, NumberDeserializers.IntegerDeserializer, NumberDeserializers.LongDeserializer, NumberDeserializers.ShortDeserializer

Enclosing class:
  NumberDeserializers

    protected abstract static class NumberDeserializers.PrimitiveOrWrapperDeserializer<T>
    extends StdScalarDeserializer<T>

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`JsonDeserializer.None`

### Field Summary

Fields
`protected T` `_emptyValue`
`protected LogicalType` `_logicalType`
`protected T` `_nullValue`
`protected boolean` `_primitive`

### Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

`_valueClass, _valueType, F_MASK_ACCEPT_ARRAYS, F_MASK_INT_COERCIONS`

### Constructor Summary

Constructors
`protected` `PrimitiveOrWrapperDeserializer(Class<T> vc, LogicalType logicalType, T nvl, T empty)`
`protected` `PrimitiveOrWrapperDeserializer(Class<T> vc, T nvl, T empty)` Deprecated.

### Method Summary

All Methods Instance Methods Concrete Methods
`Object` `getEmptyValue(DeserializationContext ctxt)` Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings).
`AccessPattern` `getNullAccessPattern()` This method may be called in conjunction with calls to `JsonDeserializer.getNullValue(DeserializationContext)`, to check whether it needs to be called just once (static values), or each time empty value is needed.
`T` `getNullValue(DeserializationContext ctxt)` Method that can be called to determine value to be used for representing null values (values deserialized when JSON token is `JsonToken.VALUE_NULL`).
`LogicalType` `logicalType()` Method for accessing logical type of values this deserializer produces.

### Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer

`deserialize, deserializeWithType, getEmptyAccessPattern, supportsUpdate`

### Methods inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer

`_byteOverflow, _checkBooleanToStringCoercion, _checkCoercionFail, _checkDoubleSpecialValue, _checkFloatSpecialValue, _checkFloatToIntCoercion, _checkFloatToStringCoercion, _checkFromStringCoercion, _checkFromStringCoercion, _checkIntToFloatCoercion, _checkIntToStringCoercion, _checkTextualNull, _checkToStringCoercion, _coerceBooleanFromInt, _coercedTypeDesc, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeFromEmptyString, _deserializeFromString, _deserializeWrappedValue, _failDoubleToIntCoercion, _findCoercionFromBlankString, _findCoercionFromEmptyArray, _findCoercionFromEmptyString, _findNullProvider, _hasTextualNull, _intOverflow, _isBlank, _isEmptyOrTextualNull, _isFalse, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _isTrue, _neitherNull, _nonNullNumber, _parseBoolean, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDouble, _parseDouble, _parseDoublePrimitive, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseInteger, _parseInteger, _parseInteger, _parseIntPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLong, _parseLong, _parseLong, _parseLongPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _parseString, _reportFailedNullCoerce, _shortOverflow, _streamReadConstraints, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueInstantiator, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleNestedArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer`

### Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer

`deserialize, deserializeWithType, findBackReference, getAbsentValue, getDelegatee, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, unwrappingDeserializer`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### _logicalType

    protected final LogicalType _logicalType

#### _nullValue

    protected final T _nullValue

#### _emptyValue

    protected final T _emptyValue

#### _primitive

    protected final boolean _primitive

### Constructor Detail

#### PrimitiveOrWrapperDeserializer

    protected PrimitiveOrWrapperDeserializer(Class<T> vc,
                                             LogicalType logicalType,
                                             T nvl,
                                             T empty)

#### PrimitiveOrWrapperDeserializer

    @Deprecated
    protected PrimitiveOrWrapperDeserializer(Class<T> vc,
                                                         T nvl,
                                                         T empty)

Deprecated.

### Method Detail

#### getNullAccessPattern

    public AccessPattern getNullAccessPattern()

Description copied from class: `JsonDeserializer`
This method may be called in conjunction with calls to `JsonDeserializer.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 `JsonDeserializer.getNullValue(DeserializationContext)` need not be called more than once per deserializer instance. This information may be used as optimization.

Specified by:
  `getNullAccessPattern` in interface `NullValueProvider`
Overrides:
  `getNullAccessPattern` in class `StdScalarDeserializer<T>`

#### getNullValue

    public final T getNullValue(DeserializationContext ctxt)
                         throws JsonMappingException

Description copied from class: `JsonDeserializer`
Method that can be called to determine value to be used for representing null values (values deserialized when JSON token is `JsonToken.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 `JsonDeserializer.getNullAccessPattern()` returns.

Default implementation simply returns null.

Specified by:
  `getNullValue` in interface `NullValueProvider`
Overrides:
  `getNullValue` in class `JsonDeserializer<T>`
Throws:
  `JsonMappingException`

#### getEmptyValue

    public Object getEmptyValue(DeserializationContext ctxt)
                         throws JsonMappingException

Description copied from class: `JsonDeserializer`
Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings). Usually this is same as `JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)` (which in turn is usually simply Java null), but it can be overridden for specific types. Or, if type should never be converted from empty String, method can also throw an exception.

This method may be called once, or multiple times, depending on what `JsonDeserializer.getEmptyAccessPattern()` returns.

Default implementation simply calls `JsonDeserializer.getNullValue(com.fasterxml.jackson.databind.DeserializationContext)` and returns value.

Overrides:
  `getEmptyValue` in class `JsonDeserializer<T>`
Throws:
  `JsonMappingException`

#### logicalType

    public final LogicalType logicalType()

Description copied from class: `JsonDeserializer`
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 class `StdScalarDeserializer<T>`
Returns:
  Logical type of values this deserializer produces, if known; `null` if not