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:
Serializable
XML-specific
DeserializationContext needed to override certain
handlers.- Since:
- 2.12
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
DefaultDeserializationContext.Impl -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor for a blueprint object, which will use the standardDeserializerCache, given factory. -
Method Summary
Modifier and TypeMethodDescriptioncopy()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.createInstance(DeserializationConfig config, JsonParser p, InjectableValues values) Method called to create actual usable per-deserialization context instance.extractScalarFromObject(JsonParser p, JsonDeserializer<?> deser, 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.readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) with(DeserializerFactory factory) Fluent factory method used for constructing a blueprint instance with different factoryFluent factory method used for constructing a new instance with cache instances provided byCacheProvider.Methods inherited from class com.fasterxml.jackson.databind.deser.DefaultDeserializationContext
checkUnresolvedObjectId, deserializerInstance, findObjectId, keyDeserializerInstanceMethods inherited from class com.fasterxml.jackson.databind.DeserializationContext
bufferAsCopyOfValue, bufferForInputBuffering, bufferForInputBuffering, canOverrideAccessModifiers, constructCalendar, constructSpecializedType, constructType, 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, missingTypeIdException, parseDate, readPropertyValue, readPropertyValue, readTree, readTreeAsValue, readTreeAsValue, readValue, readValue, reportBadCoercion, reportBadDefinition, reportBadPropertyDefinition, reportBadTypeDefinition, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportInputMismatch, reportPropertyInputMismatch, reportPropertyInputMismatch, reportTrailingTokens, reportUnresolvedObjectId, reportWrongTokenException, reportWrongTokenException, reportWrongTokenException, returnObjectBuffer, setAttribute, weirdKeyException, weirdNativeValueException, weirdNumberException, weirdStringException, wrongTokenException, wrongTokenExceptionMethods inherited from class com.fasterxml.jackson.databind.DatabindContext
constructType, converterInstance, objectIdGeneratorInstance, objectIdResolverInstance, reportBadDefinition, resolveAndValidateSubType, resolveSubType
-
Constructor Details
-
XmlDeserializationContext
Default constructor for a blueprint object, which will use the standardDeserializerCache, given factory.
-
-
Method Details
-
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
- Specified by:
createDummyInstancein classDefaultDeserializationContext
-
with
Description copied from class:DefaultDeserializationContextFluent factory method used for constructing a blueprint instance with different factory- Specified by:
within classDefaultDeserializationContext
-
withCaches
Description copied from class:DefaultDeserializationContextFluent factory method used for constructing a new instance with cache instances provided byCacheProvider.- Specified by:
withCachesin classDefaultDeserializationContext
-
readRootValue
public Object readRootValue(JsonParser p, JavaType valueType, JsonDeserializer<Object> deser, Object valueToUpdate) throws IOException - Overrides:
readRootValuein classDefaultDeserializationContext- Throws:
IOException
-
extractScalarFromObject
public String extractScalarFromObject(JsonParser p, JsonDeserializer<?> deser, Class<?> scalarType) throws 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:
IOException- If there are problems either reading content (underlying parser problem) or finding expected scalar value
-