com.fasterxml.jackson.datatype.guava.deser
Class GuavaMapDeserializer<T>

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonDeserializer<T>
      extended by com.fasterxml.jackson.datatype.guava.deser.GuavaMapDeserializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer
Direct Known Subclasses:
ImmutableBiMapDeserializer, ImmutableMapDeserializer, ImmutableSortedMapDeserializer

public abstract class GuavaMapDeserializer<T>
extends com.fasterxml.jackson.databind.JsonDeserializer<T>
implements com.fasterxml.jackson.databind.deser.ContextualDeserializer


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonDeserializer
com.fasterxml.jackson.databind.JsonDeserializer.None
 
Field Summary
protected  com.fasterxml.jackson.databind.KeyDeserializer _keyDeserializer
          Key deserializer used, if not null.
protected  com.fasterxml.jackson.databind.type.MapType _mapType
           
protected  com.fasterxml.jackson.databind.jsontype.TypeDeserializer _typeDeserializerForValue
          If value instances have polymorphic type information, this is the type deserializer that can handle it
protected  com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializer
          Value deserializer.
 
Constructor Summary
protected GuavaMapDeserializer(com.fasterxml.jackson.databind.type.MapType type, com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
           
 
Method Summary
protected abstract  T _deserializeEntries(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)
           
 com.fasterxml.jackson.databind.JsonDeserializer<?> createContextual(com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.BeanProperty property)
          Method called to finalize setup of this deserializer, after deserializer itself has been registered.
 T deserialize(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt)
           
 Object deserializeWithType(com.fasterxml.jackson.core.JsonParser jp, com.fasterxml.jackson.databind.DeserializationContext ctxt, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
          Base implementation that does not assume specific type inclusion mechanism.
abstract  GuavaMapDeserializer<T> withResolved(com.fasterxml.jackson.databind.KeyDeserializer keyDeser, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser)
          Overridable fluent factory method used for creating contextual instances.
 
Methods inherited from class com.fasterxml.jackson.databind.JsonDeserializer
deserialize, getEmptyValue, getKnownPropertyNames, getNullValue, getObjectIdReader, isCachable, unwrappingDeserializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mapType

protected final com.fasterxml.jackson.databind.type.MapType _mapType

_keyDeserializer

protected com.fasterxml.jackson.databind.KeyDeserializer _keyDeserializer
Key deserializer used, if not null. If null, String from JSON content is used as is.


_valueDeserializer

protected com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializer
Value deserializer.


_typeDeserializerForValue

protected final com.fasterxml.jackson.databind.jsontype.TypeDeserializer _typeDeserializerForValue
If value instances have polymorphic type information, this is the type deserializer that can handle it

Constructor Detail

GuavaMapDeserializer

protected GuavaMapDeserializer(com.fasterxml.jackson.databind.type.MapType type,
                               com.fasterxml.jackson.databind.KeyDeserializer keyDeser,
                               com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser,
                               com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
Method Detail

withResolved

public abstract GuavaMapDeserializer<T> withResolved(com.fasterxml.jackson.databind.KeyDeserializer keyDeser,
                                                     com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser,
                                                     com.fasterxml.jackson.databind.JsonDeserializer<?> valueDeser)
Overridable fluent factory method used for creating contextual instances.


createContextual

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
Method called to finalize setup of this deserializer, after deserializer itself has been registered. This is needed to handle recursive and transitive dependencies.

Specified by:
createContextual in interface com.fasterxml.jackson.databind.deser.ContextualDeserializer
Throws:
com.fasterxml.jackson.databind.JsonMappingException

deserializeWithType

public Object deserializeWithType(com.fasterxml.jackson.core.JsonParser jp,
                                  com.fasterxml.jackson.databind.DeserializationContext ctxt,
                                  com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeserializer)
                           throws IOException,
                                  com.fasterxml.jackson.core.JsonProcessingException
Base implementation that does not assume specific type inclusion mechanism. Sub-classes are expected to override this method if they are to handle type information.

Overrides:
deserializeWithType in class com.fasterxml.jackson.databind.JsonDeserializer<T>
Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException

deserialize

public T deserialize(com.fasterxml.jackson.core.JsonParser jp,
                     com.fasterxml.jackson.databind.DeserializationContext ctxt)
              throws IOException,
                     com.fasterxml.jackson.core.JsonProcessingException
Specified by:
deserialize in class com.fasterxml.jackson.databind.JsonDeserializer<T>
Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException

_deserializeEntries

protected abstract T _deserializeEntries(com.fasterxml.jackson.core.JsonParser jp,
                                         com.fasterxml.jackson.databind.DeserializationContext ctxt)
                                  throws IOException,
                                         com.fasterxml.jackson.core.JsonProcessingException
Throws:
IOException
com.fasterxml.jackson.core.JsonProcessingException


Copyright © 2012 fasterxml.com. All Rights Reserved.