public class AsDeductionTypeDeserializer extends AsPropertyTypeDeserializer
TypeDeserializer capable of deducing polymorphic types based on the
fields available. Deduction is limited to the names of child properties
(not their values or, consequently, any nested descendants).
Exceptions will be thrown if not enough unique information is present
to select a single subtype.
The current deduction process does not support pojo-hierarchies such that the absence of child fields infers a parent type. That is, every deducible subtype MUST have some unique fields and the input data MUST contain said unique fields to provide a positive match.
_inclusion, _msgForMissingId_baseType, _defaultImpl, _defaultImplDeserializer, _deserializers, _idResolver, _property, _typeIdVisible, _typePropertyName| Constructor and Description |
|---|
AsDeductionTypeDeserializer(AsDeductionTypeDeserializer src,
BeanProperty property) |
AsDeductionTypeDeserializer(JavaType bt,
TypeIdResolver idRes,
JavaType defaultImpl,
DeserializationConfig config,
Collection<NamedType> subtypes) |
| 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.
|
_deserializeTypedForId, _deserializeTypedUsingDefaultImpl, _deserializeTypedUsingDefaultImpl, deserializeTypedFromAny, getTypeInclusion_deserialize, _locateTypeId, _usesExternalId, deserializeTypedFromArray, deserializeTypedFromScalar_deserializeWithNativeTypeId, _deserializeWithNativeTypeId, _findDefaultImplDeserializer, _findDeserializer, _handleMissingTypeId, _handleUnknownTypeId, baseType, baseTypeName, getDefaultImpl, getPropertyName, getTypeIdResolver, hasDefaultImpl, toStringdeserializeIfNatural, deserializeIfNaturalpublic AsDeductionTypeDeserializer(JavaType bt, TypeIdResolver idRes, JavaType defaultImpl, DeserializationConfig config, Collection<NamedType> subtypes)
public AsDeductionTypeDeserializer(AsDeductionTypeDeserializer src, BeanProperty property)
public TypeDeserializer forProperty(BeanProperty prop)
TypeDeserializerCollection or Map
valued properties).forProperty in class AsPropertyTypeDeserializerprotected Map<BitSet,String> buildFingerprints(DeserializationConfig config, Collection<NamedType> subtypes)
public Object deserializeTypedFromObject(JsonParser p, DeserializationContext ctxt) throws IOException
AsPropertyTypeDeserializerdeserializeTypedFromObject in class AsPropertyTypeDeserializerIOExceptionCopyright © 2008–2021 FasterXML. All rights reserved.