public class ExternalTypeHandler extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
ExternalTypeHandler.Builder |
Modifier | Constructor and Description |
---|---|
protected |
ExternalTypeHandler(ExternalTypeHandler h) |
protected |
ExternalTypeHandler(JavaType beanType,
com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties,
Map<String,Object> nameToPropertyIndex,
String[] typeIds,
TokenBuffer[] tokens) |
Modifier and Type | Method and Description |
---|---|
protected Object |
_deserialize(JsonParser p,
DeserializationContext ctxt,
int index,
String typeId) |
protected void |
_deserializeAndSet(JsonParser p,
DeserializationContext ctxt,
Object bean,
int index,
String typeId) |
static ExternalTypeHandler.Builder |
builder(JavaType beanType) |
Object |
complete(JsonParser p,
DeserializationContext ctxt,
Object bean)
Method called after JSON Object closes, and has to ensure that all external
type ids have been handled.
|
Object |
complete(JsonParser p,
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(JsonParser p,
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(JsonParser p,
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()
Method called to start collection process by creating non-blueprint
instances.
|
protected ExternalTypeHandler(JavaType beanType, com.fasterxml.jackson.databind.deser.impl.ExternalTypeHandler.ExtTypedProperty[] properties, Map<String,Object> nameToPropertyIndex, String[] typeIds, TokenBuffer[] tokens)
protected ExternalTypeHandler(ExternalTypeHandler h)
public static ExternalTypeHandler.Builder builder(JavaType beanType)
public ExternalTypeHandler start()
public boolean handleTypePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean) throws IOException
handlePropertyValue(com.fasterxml.jackson.core.JsonParser, com.fasterxml.jackson.databind.DeserializationContext, java.lang.String, java.lang.Object)
should be called instead.IOException
public boolean handlePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean) throws IOException
IOException
public Object complete(JsonParser p, DeserializationContext ctxt, Object bean) throws IOException
IOException
public Object complete(JsonParser p, DeserializationContext ctxt, PropertyValueBuffer buffer, PropertyBasedCreator creator) throws IOException
IOException
protected final Object _deserialize(JsonParser p, DeserializationContext ctxt, int index, String typeId) throws IOException
IOException
protected final void _deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object bean, int index, String typeId) throws IOException
IOException
Copyright © 2018 JBoss by Red Hat. All rights reserved.