com.fasterxml.jackson.annotation.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 |
|---|---|
| public static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final JavaType | |
| private final Map | _nameToPropertyIndex
Mapping from external property ids to one or more indexes;
in most cases single index as |
| private final ExternalTypeHandler. | |
| private final TokenBuffer[] | |
| private final String[] |
| Access | Constructor and Description |
|---|---|
| protected | ExternalTypeHandler(JavaType beanType, ExternalTypeHandler.
|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected final Object | |
| protected final void | _deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object bean, int index, String typeId)
|
| protected final Object | |
| private final boolean | _handleTypePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean, String typeId, int index)
|
| public static ExternalTypeHandler. | |
| public 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. |
| public 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. |
| public boolean | Returns: True, if the given property was properly handledMethod called to ask handler to handle value of given property, at point where parser points to the first token of the value. |
| public 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. |
| public ExternalTypeHandler |
| _beanType | back to summary |
|---|---|
| private final JavaType _beanType | |
| _nameToPropertyIndex | back to summary |
|---|---|
| private final Map<String, Object> _nameToPropertyIndex Mapping from external property ids to one or more indexes;
in most cases single index as | |
| _properties | back to summary |
|---|---|
| private final ExternalTypeHandler. | |
| _tokens | back to summary |
|---|---|
| private final TokenBuffer[] _tokens | |
| _typeIds | back to summary |
|---|---|
| private final String[] _typeIds | |
| ExternalTypeHandler | back to summary |
|---|---|
| protected ExternalTypeHandler(JavaType beanType, ExternalTypeHandler. | |
| ExternalTypeHandler | back to summary |
|---|---|
| protected ExternalTypeHandler(ExternalTypeHandler h) | |
| _deserialize | back to summary |
|---|---|
protected final Object _deserialize(JsonParser p, DeserializationContext ctxt, int index, String typeId) throws IOException
| |
| _deserializeAndSet | back to summary |
|---|---|
protected final void _deserializeAndSet(JsonParser p, DeserializationContext ctxt, Object bean, int index, String typeId) throws IOException
| |
| _deserializeMissingToken | back to summary |
|---|---|
protected final Object _deserializeMissingToken(JsonParser p, DeserializationContext ctxt, int index, String typeId) throws IOException
| |
| _handleTypePropertyValue | back to summary |
|---|---|
| private final boolean _handleTypePropertyValue(JsonParser p, DeserializationContext ctxt, String propName, Object bean, String typeId, int index) throws IOException | |
| builder | back to summary |
|---|---|
public static ExternalTypeHandler.
| |
| complete | back to summary |
|---|---|
| public Object complete(JsonParser p, DeserializationContext ctxt, Object bean) throws IOException Method called after JSON Object closes, and has to ensure that all external type ids have been handled.
| |
| complete | back to summary |
|---|---|
| public Object complete(JsonParser p, 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. | |
| handlePropertyValue | back to summary |
|---|---|
| public boolean handlePropertyValue(JsonParser p, 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.
| |
| handleTypePropertyValue | back to summary |
|---|---|
| public boolean handleTypePropertyValue(JsonParser p, 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 AND
value is of scalar type:
otherwise
| |
| start | back to summary |
|---|---|
| public ExternalTypeHandler start() Method called to start collection process by creating non-blueprint instances. | |
| Modifier and Type | Field and Description |
|---|---|
| private final JavaType | |
| private final Map | |
| private final List |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | |
| public ExternalTypeHandler | build(BeanPropertyMap otherProps)
Method called after all external properties have been assigned, to further link property with polymorphic value with possible property for type id itself. |
| _beanType | back to summary |
|---|---|
| private final JavaType _beanType | |
| _nameToPropertyIndex | back to summary |
|---|---|
| private final Map<String, Object> _nameToPropertyIndex | |
| _properties | back to summary |
|---|---|
| private final List<ExternalTypeHandler. | |
| Builder | back to summary |
|---|---|
| protected Builder(JavaType t) | |
| _addPropertyIndex | back to summary |
|---|---|
| private void _addPropertyIndex(String name, Integer index) | |
| addExternal | back to summary |
|---|---|
| public void addExternal(SettableBeanProperty property, TypeDeserializer typeDeser) | |
| build | back to summary |
|---|---|
| public ExternalTypeHandler build(BeanPropertyMap otherProps) Method called after all external properties have been assigned, to further link property with polymorphic value with possible property for type id itself. This is needed to support type ids as Creator properties.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SettableBeanProperty | |
| private final TypeDeserializer | |
| private SettableBeanProperty | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | getDefaultTypeId()
Specialized called when we need to expose type id of `defaultImpl` when serializing: we may need to expose it for assignment to a property, or it may be requested as visible for some other reason. |
| public SettableBeanProperty | |
| public SettableBeanProperty | |
| public String | |
| public boolean | |
| public boolean | |
| public void |
| _property | back to summary |
|---|---|
| private final SettableBeanProperty _property | |
| _typeDeserializer | back to summary |
|---|---|
| private final TypeDeserializer _typeDeserializer | |
| _typeProperty | back to summary |
|---|---|
private SettableBeanProperty _typeProperty
| |
| _typePropertyName | back to summary |
|---|---|
| private final String _typePropertyName | |
| ExtTypedProperty | back to summary |
|---|---|
| public ExtTypedProperty(SettableBeanProperty property, TypeDeserializer typeDeser) | |
| getDefaultTypeId | back to summary |
|---|---|
| public String getDefaultTypeId() Specialized called when we need to expose type id of `defaultImpl` when serializing: we may need to expose it for assignment to a property, or it may be requested as visible for some other reason. | |
| getProperty | back to summary |
|---|---|
| public SettableBeanProperty getProperty() | |
| getTypeProperty | back to summary |
|---|---|
public SettableBeanProperty getTypeProperty()
| |
| getTypePropertyName | back to summary |
|---|---|
| public String getTypePropertyName() | |
| hasDefaultType | back to summary |
|---|---|
| public boolean hasDefaultType() | |
| hasTypePropertyName | back to summary |
|---|---|
| public boolean hasTypePropertyName(String n) | |
| linkTypeProperty | back to summary |
|---|---|
public void linkTypeProperty(SettableBeanProperty p)
| |