com.fasterxml.jackson.databind.jsontype.impl

## Class AsDeductionTypeDeserializer

- java.lang.Object
- - com.fasterxml.jackson.databind.jsontype.TypeDeserializer
  - - com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase
    - - com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDeserializer
      - - com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer
        - - com.fasterxml.jackson.databind.jsontype.impl.AsDeductionTypeDeserializer

- All Implemented Interfaces:
    Serializable

      public class AsDeductionTypeDeserializer
      extends AsPropertyTypeDeserializer

  A `TypeDeserializer` capable of deducing polymorphic types based on the fields available. Deduction is limited to the names of child fields (not their values or, consequently, any nested descendants). Exceptions will be thrown if not enough unique information is present to select a single subtype.
  See Also:
    Serialized Form

- - ### Field Summary

    - ### Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer

      `_inclusion`

    - ### Fields inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase

      `_baseType, _defaultImpl, _defaultImplDeserializer, _deserializers, _idResolver, _property, _typeIdVisible, _typePropertyName`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AsDeductionTypeDeserializer(AsDeductionTypeDeserializer src, BeanProperty property)`
    `AsDeductionTypeDeserializer(JavaType bt, TypeIdResolver idRes, JavaType defaultImpl, DeserializationConfig config, Collection<NamedType> subtypes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Map<BitSet,String>` | `buildFingerprints(DeserializationConfig config, Collection<NamedType> subtypes)`
    `Object` | `deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt)` This is the trickiest thing to handle, since property we are looking for may be anywhere...
    `TypeDeserializer` | `forProperty(BeanProperty prop)` Method called to create contextual version, to be used for values of given property.
    `JsonTypeInfo.As` | `getTypeInclusion()` Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.AsPropertyTypeDeserializer

      `_deserializeTypedForId, _deserializeTypedUsingDefaultImpl, deserializeTypedFromAny`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.AsArrayTypeDeserializer

      `_deserialize, _locateTypeId, _usesExternalId, deserializeTypedFromArray, deserializeTypedFromScalar`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.impl.TypeDeserializerBase

      `_deserializeWithNativeTypeId, _deserializeWithNativeTypeId, _findDefaultImplDeserializer, _findDeserializer, _handleMissingTypeId, _handleUnknownTypeId, baseType, baseTypeName, getDefaultImpl, getPropertyName, getTypeIdResolver, hasDefaultImpl, toString`

    - ### Methods inherited from class com.fasterxml.jackson.databind.jsontype.TypeDeserializer

      `deserializeIfNatural, deserializeIfNatural`

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

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

- - ### Constructor Detail

    - #### AsDeductionTypeDeserializer

          public AsDeductionTypeDeserializer(JavaType bt,
                                             TypeIdResolver idRes,
                                             JavaType defaultImpl,
                                             DeserializationConfig config,
                                             Collection<NamedType> subtypes)

    - #### AsDeductionTypeDeserializer

          public AsDeductionTypeDeserializer(AsDeductionTypeDeserializer src,
                                             BeanProperty property)

  - ### Method Detail

    - #### getTypeInclusion

          public JsonTypeInfo.As getTypeInclusion()

      Description copied from class: `TypeDeserializer`
      Accessor for type information inclusion method that deserializer uses; indicates how type information is (expected to be) embedded in JSON input.
      Overrides:
        `getTypeInclusion` in class `AsPropertyTypeDeserializer`

    - #### forProperty

          public TypeDeserializer forProperty(BeanProperty prop)

      Description copied from class: `TypeDeserializer`
      Method called to create contextual version, to be used for values of given property. This may be the type itself (as is the case for bean properties), or values contained (for `Collection` or `Map` valued properties).
      Overrides:
        `forProperty` in class `AsPropertyTypeDeserializer`

    - #### buildFingerprints

          protected Map<BitSet,String> buildFingerprints(DeserializationConfig config,
                                                         Collection<NamedType> subtypes)

    - #### deserializeTypedFromObject

          public Object deserializeTypedFromObject(JsonParser p,
                                                   DeserializationContext ctxt)
                                            throws IOException

      Description copied from class: `AsPropertyTypeDeserializer`
      This is the trickiest thing to handle, since property we are looking for may be anywhere...
      Overrides:
        `deserializeTypedFromObject` in class `AsPropertyTypeDeserializer`
      Throws:
        `IOException`

Copyright © 2008–2020 FasterXML. All rights reserved.