public abstract class GuavaMultimapDeserializer<T extends com.google.common.collect.Multimap<java.lang.Object,java.lang.Object>>
extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
implements com.fasterxml.jackson.databind.deser.ContextualDeserializer
Modifier and Type | Field and Description |
---|---|
private java.lang.reflect.Method |
creatorMethod
Since we have to use a method to transform from a known multi-map type into actual one, we'll
resolve method just once, use it.
|
private com.fasterxml.jackson.databind.JsonDeserializer<?> |
elementDeserializer |
private com.fasterxml.jackson.databind.jsontype.TypeDeserializer |
elementTypeDeserializer |
private com.fasterxml.jackson.databind.KeyDeserializer |
keyDeserializer |
private static java.util.List<java.lang.String> |
METHOD_NAMES |
private com.fasterxml.jackson.databind.deser.NullValueProvider |
nullProvider |
private static long |
serialVersionUID |
private boolean |
skipNullValues |
private com.fasterxml.jackson.databind.type.MapLikeType |
type |
Constructor and Description |
---|
GuavaMultimapDeserializer(com.fasterxml.jackson.databind.type.MapLikeType type,
com.fasterxml.jackson.databind.KeyDeserializer keyDeserializer,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer elementTypeDeserializer,
com.fasterxml.jackson.databind.JsonDeserializer<?> elementDeserializer) |
GuavaMultimapDeserializer(com.fasterxml.jackson.databind.type.MapLikeType type,
com.fasterxml.jackson.databind.KeyDeserializer keyDeserializer,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer elementTypeDeserializer,
com.fasterxml.jackson.databind.JsonDeserializer<?> elementDeserializer,
java.lang.reflect.Method creatorMethod,
com.fasterxml.jackson.databind.deser.NullValueProvider nvp) |
Modifier and Type | Method and Description |
---|---|
protected abstract com.fasterxml.jackson.databind.JsonDeserializer<?> |
_createContextual(com.fasterxml.jackson.databind.type.MapLikeType t,
com.fasterxml.jackson.databind.KeyDeserializer kd,
com.fasterxml.jackson.databind.jsontype.TypeDeserializer vtd,
com.fasterxml.jackson.databind.JsonDeserializer<?> vd,
java.lang.reflect.Method method,
com.fasterxml.jackson.databind.deser.NullValueProvider np) |
private java.lang.Throwable |
_peel(java.lang.Throwable t) |
com.fasterxml.jackson.databind.JsonDeserializer<?> |
createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt,
com.fasterxml.jackson.databind.BeanProperty property)
We need to use this method to properly handle possible contextual variants of key and value
deserializers, as well as type deserializers.
|
protected abstract T |
createMultimap() |
T |
deserialize(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
private T |
deserializeContents(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
private T |
deserializeFromSingleValue(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
private void |
expect(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.core.JsonToken token) |
private static java.lang.reflect.Method |
findTransformer(java.lang.Class<?> rawType) |
private java.lang.Object |
getCurrentTokenValue(com.fasterxml.jackson.core.JsonParser p,
com.fasterxml.jackson.databind.DeserializationContext ctxt) |
_byteOverflow, _coercedTypeDesc, _coerceEmptyString, _coerceIntegral, _coerceNullToken, _coerceTextualNull, _deserializeFromArray, _deserializeFromEmpty, _deserializeWrappedValue, _failDoubleToIntCoercion, _findNullProvider, _hasTextualNull, _intOverflow, _isEmptyOrTextualNull, _isIntNumber, _isNaN, _isNegInf, _isPosInf, _neitherNull, _nonNullNumber, _parseBooleanFromInt, _parseBooleanPrimitive, _parseBytePrimitive, _parseDate, _parseDate, _parseDateFromArray, _parseDoublePrimitive, _parseDoublePrimitive, _parseFloatPrimitive, _parseFloatPrimitive, _parseIntPrimitive, _parseIntPrimitive, _parseLongPrimitive, _parseLongPrimitive, _parseShortPrimitive, _parseString, _reportFailedNullCoerce, _shortOverflow, _verifyEndArrayForSingle, _verifyNullForPrimitive, _verifyNullForPrimitiveCoercion, _verifyNullForScalarCoercion, _verifyNumberForScalarCoercion, _verifyStringForScalarCoercion, deserializeWithType, findContentNullProvider, findContentNullStyle, findConvertingContentDeserializer, findDeserializer, findFormatFeature, findFormatOverrides, findValueNullProvider, getValueClass, getValueType, getValueType, handledType, handleMissingEndArrayForSingle, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
deserialize, deserializeWithType, findBackReference, getDelegatee, getEmptyAccessPattern, getEmptyValue, getEmptyValue, getKnownPropertyNames, getNullAccessPattern, getNullValue, getNullValue, getObjectIdReader, isCachable, replaceDelegatee, supportsUpdate, unwrappingDeserializer
private static final long serialVersionUID
private static final java.util.List<java.lang.String> METHOD_NAMES
private final com.fasterxml.jackson.databind.type.MapLikeType type
private final com.fasterxml.jackson.databind.KeyDeserializer keyDeserializer
private final com.fasterxml.jackson.databind.jsontype.TypeDeserializer elementTypeDeserializer
private final com.fasterxml.jackson.databind.JsonDeserializer<?> elementDeserializer
private final com.fasterxml.jackson.databind.deser.NullValueProvider nullProvider
private final boolean skipNullValues
private final java.lang.reflect.Method creatorMethod
LinkedListMultimap
instance and be done with it.public GuavaMultimapDeserializer(com.fasterxml.jackson.databind.type.MapLikeType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeserializer, com.fasterxml.jackson.databind.jsontype.TypeDeserializer elementTypeDeserializer, com.fasterxml.jackson.databind.JsonDeserializer<?> elementDeserializer)
public GuavaMultimapDeserializer(com.fasterxml.jackson.databind.type.MapLikeType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeserializer, com.fasterxml.jackson.databind.jsontype.TypeDeserializer elementTypeDeserializer, com.fasterxml.jackson.databind.JsonDeserializer<?> elementDeserializer, java.lang.reflect.Method creatorMethod, com.fasterxml.jackson.databind.deser.NullValueProvider nvp)
private static java.lang.reflect.Method findTransformer(java.lang.Class<?> rawType)
protected abstract T createMultimap()
public com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
createContextual
in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
com.fasterxml.jackson.databind.JsonMappingException
protected abstract com.fasterxml.jackson.databind.JsonDeserializer<?> _createContextual(com.fasterxml.jackson.databind.type.MapLikeType t, com.fasterxml.jackson.databind.KeyDeserializer kd, com.fasterxml.jackson.databind.jsontype.TypeDeserializer vtd, com.fasterxml.jackson.databind.JsonDeserializer<?> vd, java.lang.reflect.Method method, com.fasterxml.jackson.databind.deser.NullValueProvider np)
public T deserialize(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException, com.fasterxml.jackson.core.JsonProcessingException
deserialize
in class com.fasterxml.jackson.databind.JsonDeserializer<T extends com.google.common.collect.Multimap<java.lang.Object,java.lang.Object>>
java.io.IOException
com.fasterxml.jackson.core.JsonProcessingException
private T deserializeContents(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException
java.io.IOException
private T deserializeFromSingleValue(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException
java.io.IOException
private java.lang.Object getCurrentTokenValue(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.databind.DeserializationContext ctxt) throws java.io.IOException
java.io.IOException
private void expect(com.fasterxml.jackson.core.JsonParser p, com.fasterxml.jackson.core.JsonToken token) throws java.io.IOException
java.io.IOException
private java.lang.Throwable _peel(java.lang.Throwable t)