com.fasterxml.jackson.databind.deser.impl
Class ExternalTypeHandler

java.lang.Object
  extended by 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
static class ExternalTypeHandler.Builder
           
 
Constructor Summary
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
protected  void _deserialize(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, Object bean, int index)
           
 Object complete(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, Object bean)
           
 boolean handleToken(com.fasterxml.jackson.core.JsonParser jp, DeserializationContext ctxt, String propName, Object bean)
          Method called to ask handler to handle
 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()

handleToken

public boolean handleToken(com.fasterxml.jackson.core.JsonParser jp,
                           DeserializationContext ctxt,
                           String propName,
                           Object bean)
                    throws IOException,
                           com.fasterxml.jackson.core.JsonProcessingException
Method called to ask handler to handle

Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException

complete

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

_deserialize

protected final void _deserialize(com.fasterxml.jackson.core.JsonParser jp,
                                  DeserializationContext ctxt,
                                  Object bean,
                                  int index)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonProcessingException
Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException


Copyright © 2012 fasterxml.com. All Rights Reserved.