NumberDeserializers.PrimitiveOrWrapperDeserializer
Date: 2016-12-04

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:
    java.io.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
    Modifier and Type | Field and Description
    --- | ---
    `protected T` | `_nullValue`
    `protected boolean` | `_primitive`

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

      `_valueClass, F_MASK_INT_COERCIONS`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `NumberDeserializers.PrimitiveOrWrapperDeserializer(java.lang.Class<T> vc, T nvl)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `getEmptyValue(DeserializationContext ctxt)` Method called to determine value to be used for "empty" values (most commonly when deserializing from empty JSON Strings).
    `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`).

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

      `deserializeWithType`

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

      `_coerceIntegral, _deserializeFromEmpty, _failDoubleToIntCoercion, _hasTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _parseBoolean, _parseBooleanFromInt, _parseBooleanFromOther, _parseBooleanPrimitive, _parseByte, _parseDate, _parseDate, _parseDouble, _parseDoublePrimitive, _parseFloat, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseShort, _parseShortPrimitive, _parseString, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, getValueClass, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble`

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

      `deserialize, deserialize, findBackReference, 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

    - #### _nullValue

          protected final T _nullValue

    - #### _primitive

          protected final boolean _primitive

  - ### Constructor Detail

    - #### NumberDeserializers.PrimitiveOrWrapperDeserializer

          protected NumberDeserializers.PrimitiveOrWrapperDeserializer(java.lang.Class<T> vc,
                                                            T nvl)

  - ### Method Detail

    - #### 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.

      Since version 2.6 (in which the context argument was added), call is expected to be made each and every time a null token needs to be handled.

      Default implementation simply returns null.

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

    - #### getEmptyValue

          public T 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 types. Or, if type should never be converted from empty String, method can also throw an exception.

      Since version 2.6 (in which the context argument was added), call is expected to be made each and every time an empty value is needed.

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

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