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.
Method Summary |
protected Object |
_deserialize(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
int index)
|
protected void |
_deserializeAndSet(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
Object bean,
int index)
|
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. |
ExternalTypeHandler |
start()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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)
start
public ExternalTypeHandler start()
handlePropertyValue
public boolean handlePropertyValue(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 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
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
complete
public Object complete(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
PropertyValueBuffer buffer,
PropertyBasedCreator creator)
throws IOException,
com.fasterxml.jackson.core.JsonProcessingException
- Variant called when creation of the POJO involves buffering of creator properties
as well as property-based creator.
- Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException
_deserialize
protected final Object _deserialize(com.fasterxml.jackson.core.JsonParser jp,
DeserializationContext ctxt,
int index)
throws IOException,
com.fasterxml.jackson.core.JsonProcessingException
- Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException
_deserializeAndSet
protected final void _deserializeAndSet(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.