Class XmlDeserializationContext
- java.lang.Object
-
- com.fasterxml.jackson.databind.DatabindContext
-
- com.fasterxml.jackson.databind.DeserializationContext
-
- com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
-
- com.fasterxml.jackson.dataformat.xml.deser.XmlDeserializationContext
-
- All Implemented Interfaces:
java.io.Serializable
public class XmlDeserializationContext extends DefaultDeserializationContext
XML-specificDeserializationContextneeded to override certain handlers.- Since:
- 2.12
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
DefaultDeserializationContext.Impl
-
-
Constructor Summary
Constructors Constructor Description XmlDeserializationContext(DeserializerFactory df)Default constructor for a blueprint object, which will use the standardDeserializerCache, given factory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description XmlDeserializationContextcopy()Method needed to ensure thatObjectMapper.copy()will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.DefaultDeserializationContextcreateDummyInstance(DeserializationConfig config)DefaultDeserializationContextcreateInstance(DeserializationConfig config, JsonParser p, InjectableValues values)Method called to create actual usable per-deserialization context instance.java.lang.StringextractScalarFromObject(JsonParser p, JsonDeserializer<?> deser, java.lang.Class<?> scalarType)Method to call in case incoming shape is Object Value (and parser thereby points toJsonToken.START_OBJECTtoken), but a Scalar value (potentially coercible from String value) is expected.java.lang.ObjectreadRootValue(JsonParser p, JavaType valueType, JsonDeserializer<java.lang.Object> deser, java.lang.Object valueToUpdate)DefaultDeserializationContextwith(DeserializerFactory factory)Fluent factory method used for constructing a blueprint instance with different factory-
Methods inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
checkUnresolvedObjectId, deserializerInstance, findObjectId, keyDeserializerInstance
-
Methods inherited from class com.fasterxml.jackson.databind.DeserializationContext
bufferAsCopyOfValue, bufferForInputBuffering, bufferForInputBuffering, canOverrideAccessModifiers, constructCalendar, constructSpecializedType, constructType, endOfInputException, findClass, findCoercionAction, findCoercionFromBlankString, findContextualValueDeserializer, findInjectableValue, findKeyDeserializer, findNonContextualValueDeserializer, findRootValueDeserializer, getActiveView, getAnnotationIntrospector, getArrayBuilders, getAttribute, getBase64Variant, getConfig, getContextualType, getDatatypeFeatures, getDefaultPropertyFormat, getDeserializationFeatures, getFactory, getLocale, getNodeFactory, getParser, getTimeZone, getTypeFactory, handleBadMerge, handleInstantiationProblem, handleMissingInstantiator, handleMissingTypeId, handlePrimaryContextualization, handleSecondaryContextualization, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnexpectedToken, handleUnknownProperty, handleUnknownTypeId, handleWeirdKey, handleWeirdNativeValue, handleWeirdNumberValue, handleWeirdStringValue, hasDeserializationFeatures, hasSomeOfFeatures, hasValueDeserializerFor, instantiationException, instantiationException, invalidTypeIdException, isEnabled, isEnabled, isEnabled, isEnabled, leaseObjectBuffer, mappingException, mappingException, mappingException, mappingException, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readTreeAsValue, readTreeAsValue, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadMerge, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportMappingException, reportMissingContent, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnknownProperty, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, unknownTypeException, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenException, wrongTokenException
-
Methods inherited from class com.fasterxml.jackson.databind.DatabindContext
constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
-
-
-
-
Constructor Detail
-
XmlDeserializationContext
public XmlDeserializationContext(DeserializerFactory df)
Default constructor for a blueprint object, which will use the standardDeserializerCache, given factory.
-
-
Method Detail
-
copy
public XmlDeserializationContext copy()
Description copied from class:DefaultDeserializationContextMethod needed to ensure thatObjectMapper.copy()will work properly; specifically, that caches are cleared, but settings will otherwise remain identical; and that no sharing of state occurs.- Overrides:
copyin classDefaultDeserializationContext
-
createInstance
public DefaultDeserializationContext createInstance(DeserializationConfig config, JsonParser p, InjectableValues values)
Description copied from class:DefaultDeserializationContextMethod called to create actual usable per-deserialization context instance.- Specified by:
createInstancein classDefaultDeserializationContext
-
createDummyInstance
public DefaultDeserializationContext createDummyInstance(DeserializationConfig config)
- Specified by:
createDummyInstancein classDefaultDeserializationContext
-
with
public DefaultDeserializationContext with(DeserializerFactory factory)
Description copied from class:DefaultDeserializationContextFluent factory method used for constructing a blueprint instance with different factory- Specified by:
within classDefaultDeserializationContext
-
readRootValue
public java.lang.Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<java.lang.Object> deser, java.lang.Object valueToUpdate) throws java.io.IOException
- Overrides:
readRootValuein classDefaultDeserializationContext- Throws:
java.io.IOException
-
extractScalarFromObject
public java.lang.String extractScalarFromObject(JsonParser p, JsonDeserializer<?> deser, java.lang.Class<?> scalarType) throws java.io.IOException
Description copied from class:DeserializationContextMethod to call in case incoming shape is Object Value (and parser thereby points toJsonToken.START_OBJECTtoken), 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.- Overrides:
extractScalarFromObjectin classDeserializationContext- Parameters:
p- Actual parser to read content fromdeser- Deserializer that needs extracted String valuescalarType- Immediate type of scalar to extract; usually type deserializer handles but not always (for example, deserializer forint[]would pass scalar type ofint)- Returns:
- String value found; not
null(exception should be thrown if no suitable value found) - Throws:
java.io.IOException- If there are problems either reading content (underlying parser problem) or finding expected scalar value
-
-