com.fasterxml.jackson.databind.deser.impl

## Class ExternalTypeHandler

- java.lang.Object
- - com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler

    public class ExternalTypeHandler
    extends Object

Helper class that is used to flatten JSON structure when using "external type id" (see `JsonTypeInfo.As.EXTERNAL_PROPERTY`). This is needed to store temporary state and buffer tokens, as the structure is rearranged a bit so that actual type deserializer can resolve type and finalize deserialization.

### Nested Class Summary

Nested Classes
`static class` `ExternalTypeHandler.Builder`

### Constructor Summary

Constructors
`protected` `ExternalTypeHandler(com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties, HashMap<String,Integer> nameToPropertyIndex, String[] typeIds, TokenBuffer[] tokens)`
`protected` `ExternalTypeHandler(ExternalTypeHandler h)`

### Method Summary

Methods
`protected Object` `_deserialize(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, int index, String typeId)`
`protected void` `_deserializeAndSet(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, Object bean, int index, String typeId)`
`Object` `complete(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, Object bean)`
`Object` `complete(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, PropertyValueBuffer buffer, PropertyBasedCreator creator)` Variant called when creation of the POJO involves buffering of creator properties as well as property-based creator.
`boolean` `handlePropertyValue(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, String propName, Object bean)` Method called to ask handler to handle value of given property, at point where parser points to the first token of the value.
`boolean` `handleTypePropertyValue(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, String propName, Object bean)` Method called to see if given property/value pair is an external type id; and if so handle it.
`ExternalTypeHandler` `start()`

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

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

### Constructor Detail

#### ExternalTypeHandler

    protected ExternalTypeHandler(com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties,
                       HashMap<String,Integer> nameToPropertyIndex,
                       String[] typeIds,
                       TokenBuffer[] tokens)

#### ExternalTypeHandler

    protected ExternalTypeHandler(ExternalTypeHandler h)

### Method Detail

#### start

    public ExternalTypeHandler start()

#### handleTypePropertyValue

    public boolean handleTypePropertyValue(com.fasterxml.jackson.core.JsonParser jp,
                                  DeserializationContext ctxt,
                                  String propName,
                                  Object bean)
                                    throws IOException

Method called to see if given property/value pair is an external type id; and if so handle it. This is only to be called in case containing POJO has similarly named property as the external type id; otherwise `handlePropertyValue(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.String, java.lang.Object)` should be called instead.

Throws:
  `IOException`

#### handlePropertyValue

    public boolean handlePropertyValue(com.fasterxml.jackson.core.JsonParser jp,
                              DeserializationContext ctxt,
                              String propName,
                              Object bean)
                                throws IOException

Method called to ask handler to handle value of given property, at point where parser points to the first token of the value. Handling can mean either resolving type id it contains (if it matches type property name), or by buffering the value for further use.

Returns:
  True, if the given property was properly handled
Throws:
  `IOException`

#### complete

    public Object complete(com.fasterxml.jackson.core.JsonParser jp,
                  DeserializationContext ctxt,
                  Object bean)
                    throws IOException

Throws:
  `IOException`

#### complete

    public Object complete(com.fasterxml.jackson.core.JsonParser jp,
                  DeserializationContext ctxt,
                  PropertyValueBuffer buffer,
                  PropertyBasedCreator creator)
                    throws IOException

Variant called when creation of the POJO involves buffering of creator properties as well as property-based creator.

Throws:
  `IOException`

#### _deserialize

    protected final Object _deserialize(com.fasterxml.jackson.core.JsonParser jp,
                      DeserializationContext ctxt,
                      int index,
                      String typeId)
                                 throws IOException

Throws:
  `IOException`

#### _deserializeAndSet

    protected final void _deserializeAndSet(com.fasterxml.jackson.core.JsonParser jp,
                          DeserializationContext ctxt,
                          Object bean,
                          int index,
                          String typeId)
                                     throws IOException

Throws:
  `IOException`