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

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonDeserializer<T>
      extended by com.fasterxml.jackson.databind.deser.std.StdDeserializer<T>
          extended by com.fasterxml.jackson.datatype.guava.deser.GuavaCollectionDeserializer<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.deser.ContextualDeserializer
Direct Known Subclasses:
HashMultisetDeserializer, ImmutableListDeserializer, ImmutableMultisetDeserializer, ImmutableSetDeserializer, ImmutableSortedSetDeserializer, LinkedHashMultisetDeserializer, TreeMultisetDeserializer

public abstract class GuavaCollectionDeserializer<T>
extends com.fasterxml.jackson.databind.deser.std.StdDeserializer<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.type.CollectionType _containerType
           
protected  com.fasterxml.jackson.databind.jsontype.TypeDeserializer _typeDeserializerForValue
          If value instances have polymorphic type information, this is the type deserializer that can deserialize required type information
protected  com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializer
          Deserializer used for values contained in collection being deserialized; either assigned on constructor, or during resolve().
 
Fields inherited from class com.fasterxml.jackson.databind.deser.std.StdDeserializer
_valueClass
 
Constructor Summary
protected GuavaCollectionDeserializer(com.fasterxml.jackson.databind.type.CollectionType type, com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser, com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
           
 
Method Summary
protected abstract  T _deserializeContents(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  GuavaCollectionDeserializer<T> withResolved(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.deser.std.StdDeserializer
_parseBoolean, _parseBooleanFromNumber, _parseBooleanPrimitive, _parseByte, _parseDate, _parseDouble, _parseDoublePrimitive, _parseFloat, _parseFloatPrimitive, _parseInteger, _parseIntPrimitive, _parseLong, _parseLongPrimitive, _parseShort, _parseShortPrimitive, findDeserializer, getValueClass, getValueType, handleUnknownProperty, isDefaultDeserializer, isDefaultKeyDeserializer, parseDouble
 
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

_containerType

protected final com.fasterxml.jackson.databind.type.CollectionType _containerType

_valueDeserializer

protected final com.fasterxml.jackson.databind.JsonDeserializer<?> _valueDeserializer
Deserializer used for values contained in collection being deserialized; either assigned on constructor, or during resolve().


_typeDeserializerForValue

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

Constructor Detail

GuavaCollectionDeserializer

protected GuavaCollectionDeserializer(com.fasterxml.jackson.databind.type.CollectionType type,
                                      com.fasterxml.jackson.databind.jsontype.TypeDeserializer typeDeser,
                                      com.fasterxml.jackson.databind.JsonDeserializer<?> deser)
Method Detail

withResolved

public abstract GuavaCollectionDeserializer<T> withResolved(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.deser.std.StdDeserializer<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

_deserializeContents

protected abstract T _deserializeContents(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.