Top Description Fields Constructors Methods
com.fasterxml.jackson.dataformat.xml.deser

public Class XmlDeserializationContext

extends DefaultDeserializationContext
Class Inheritance
Imports
java.io.IOException, com.fasterxml.jackson.core.JsonParser, .JsonToken, com.fasterxml.jackson.databind.*, com.fasterxml.jackson.databind.cfg.CacheProvider, com.fasterxml.jackson.databind.deser.DefaultDeserializationContext, .DeserializerCache, .DeserializerFactory

XML-specific DeserializationContext needed to override certain handlers.
Since
2.12

Field Summary

Modifier and TypeField and Description
private static final long
Inherited from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext:
_objectIds

Constructor Summary

AccessConstructor and Description
public
XmlDeserializationContext(DeserializerFactory df)

Default constructor for a blueprint object, which will use the standard DeserializerCache, given factory.

private
private
private
private
private

Method Summary

Modifier and TypeMethod and Description
public XmlDeserializationContext
copy()

Overrides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

public DefaultDeserializationContext
public DefaultDeserializationContext
createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Method called to create actual usable per-deserialization context instance.

public String
extractScalarFromObject(JsonParser
Actual parser to read content from
p
,
JsonDeserializer<?>
Deserializer that needs extracted String value
deser
,
Class<?>
Immediate type of scalar to extract; usually type deserializer handles but not always (for example, deserializer for int[] would pass scalar type of int)
scalarType
)

Overrides com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject.

Method to call in case incoming shape is Object Value (and parser thereby points to com.fasterxml.jackson.core.JsonToken#START_OBJECT token), but a Scalar value (potentially coercible from String value) is expected.

public Object
public DefaultDeserializationContext
with(DeserializerFactory factory)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Fluent factory method used for constructing a blueprint instance with different factory

public DefaultDeserializationContext
withCaches(CacheProvider cp)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Inherited from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext:
_unwrapAndDeserializecheckUnresolvedObjectIdcreateReadableObjectIddeserializerInstancefindObjectIdkeyDeserializerInstancetryToResolveUnresolvedObjectId

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Hides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.serialVersionUID.

Constructor Detail

XmlDeserializationContextback to summary
public XmlDeserializationContext(DeserializerFactory df)

Default constructor for a blueprint object, which will use the standard DeserializerCache, given factory.

XmlDeserializationContextback to summary
private XmlDeserializationContext(XmlDeserializationContext src, DeserializationConfig config, JsonParser p, InjectableValues values)
XmlDeserializationContextback to summary
private XmlDeserializationContext(XmlDeserializationContext src)
XmlDeserializationContextback to summary
private XmlDeserializationContext(XmlDeserializationContext src, DeserializerFactory factory)
XmlDeserializationContextback to summary
private XmlDeserializationContext(XmlDeserializationContext src, DeserializationConfig config)
XmlDeserializationContextback to summary
private XmlDeserializationContext(XmlDeserializationContext src, CacheProvider cp)

Method Detail

copyback to summary
public XmlDeserializationContext copy()

Overrides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.copy.

Method needed to ensure that ObjectMapper#copy will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.

Annotations
@Override
createDummyInstanceback to summary
public DefaultDeserializationContext createDummyInstance(DeserializationConfig config)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createDummyInstance.

Annotations
@Override
createInstanceback to summary
public DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.createInstance.

Method called to create actual usable per-deserialization context instance.

Annotations
@Override
extractScalarFromObjectback to summary
public String extractScalarFromObject(JsonParser p, JsonDeserializer<?> deser, Class<?> scalarType) throws IOException

Overrides com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject.

Doc from com.fasterxml.jackson.databind.DeserializationContext.extractScalarFromObject.

Method to call in case incoming shape is Object Value (and parser thereby points to com.fasterxml.jackson.core.JsonToken#START_OBJECT token), but a Scalar value (potentially coercible from String value) is expected. This would typically be used to deserializer a Number, Boolean value or some other "simple" unstructured value type.

Parameters
p:JsonParser

Actual parser to read content from

deser:JsonDeserializer<?>

Deserializer that needs extracted String value

scalarType:Class<?>

Immediate type of scalar to extract; usually type deserializer handles but not always (for example, deserializer for int[] would pass scalar type of int)

Returns:String

String value found; not null (exception should be thrown if no suitable value found)

Annotations
@Override
Exceptions
IOException:
If there are problems either reading content (underlying parser problem) or finding expected scalar value
readRootValueback to summary
public Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException

Overrides com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue.

Annotations
@Override
withback to summary
public DefaultDeserializationContext with(DeserializerFactory factory)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.with.

Fluent factory method used for constructing a blueprint instance with different factory

Annotations
@Override
withCachesback to summary
public DefaultDeserializationContext withCaches(CacheProvider cp)

Implements abstract com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Doc from com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.withCaches.

Fluent factory method used for constructing a new instance with cache instances provided by CacheProvider.

Annotations
@Override