Top Description Fields Constructors Methods
tools.jackson.datatype.guava

public Class GuavaDeserializers

extends Base
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Imports
java.io.Serializable, com.google.common.base.Optional, com.google.common.cache.Cache, com.google.common.collect.*, com.google.common.hash.HashCode, com.google.common.net.HostAndPort, .InternetDomainName, tools.jackson.databind.*, tools.jackson.databind.deser.Deserializers, tools.jackson.databind.jsontype.TypeDeserializer, tools.jackson.databind.type.CollectionType, .MapLikeType, .MapType, .ReferenceType, tools.jackson.datatype.guava.deser.*, tools.jackson.datatype.guava.deser.multimap.list.ArrayListMultimapDeserializer, .LinkedListMultimapDeserializer, tools.jackson.datatype.guava.deser.multimap.set.HashMultimapDeserializer, .LinkedHashMultimapDeserializer, tools.jackson.datatype.guava.deser.table.HashBasedTableDeserializer, .ImmutableTableDeserializer, .TreeBasedTableDeserializer, tools.jackson.datatype.guava.util.ImmutablePrimitiveTypes, .PrimitiveTypes

Custom deserializers module offers.

Field Summary

Modifier and TypeField and Description
protected BoundType
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
public
GuavaDeserializers(BoundType defaultBoundType)

Method Summary

Modifier and TypeMethod and Description
public ValueDeserializer<?>
findBeanDeserializer(final JavaType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef)

Overrides default tools.jackson.databind.deser.Deserializers.findBeanDeserializer.

Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array, reference value or tree node)

private Optional<ValueDeserializer<?>>

Returns:

An optional JsonDeserializer for the cache type, if found.
findCacheDeserializer
(Class<?> raw, MapLikeType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Find matching implementation of Cache deserializers by checking if the parameter raw type is assignable.

public ValueDeserializer<?>
findCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findCollectionDeserializer.

We have plenty of collection types to support...

public ValueDeserializer<?>
findMapDeserializer(MapType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer valueTypeDeserializer, ValueDeserializer<?> valueDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findMapDeserializer.

A few Map types to support.

public ValueDeserializer<?>
findMapLikeDeserializer(MapLikeType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findMapLikeDeserializer.

Method called to locate deserializer for specified "Map-like" type (one that acts like java.util.Map but does not implement it).

public ValueDeserializer<?>
findReferenceDeserializer(ReferenceType refType, DeserializationConfig config, BeanDescription.Supplier beanDescRef, TypeDeserializer contentTypeDeserializer, ValueDeserializer<?> contentDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findReferenceDeserializer.

Method called to locate deserializer for value that is of referential type,

public boolean
hasDeserializerFor(DeserializationConfig config, Class<?> valueType)

Implements abstract tools.jackson.databind.deser.Deserializers.Base.hasDeserializerFor.

Implements tools.jackson.databind.deser.Deserializers.hasDeserializerFor.

Method that may be called to check whether this deserializer provider would provide deserializer for values of given type, without attempting to construct (and possibly fail in some cases) actual deserializer.

private void

Field Detail

_defaultBoundTypeback to summary
protected BoundType _defaultBoundType
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Constructor Detail

GuavaDeserializersback to summary
public GuavaDeserializers()
GuavaDeserializersback to summary
public GuavaDeserializers(BoundType defaultBoundType)

Method Detail

findBeanDeserializerback to summary
public ValueDeserializer<?> findBeanDeserializer(final JavaType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef)

Overrides default tools.jackson.databind.deser.Deserializers.findBeanDeserializer.

Doc from tools.jackson.databind.deser.Deserializers.findBeanDeserializer.

Method called to locate deserializer for specified value type which does not belong to any other category (not an Enum, Collection, Map, Array, reference value or tree node)

Annotations
@Override
findCacheDeserializerback to summary
private Optional<ValueDeserializer<?>> findCacheDeserializer(Class<?> raw, MapLikeType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Find matching implementation of Cache deserializers by checking if the parameter raw type is assignable.

Note

Make sure the cache implementations are checked in such a way that more concrete classes are compared first before more abstract ones.

Returns:Optional<ValueDeserializer<?>>

An optional JsonDeserializer for the cache type, if found.

Since
2.16
findCollectionDeserializerback to summary
public ValueDeserializer<?> findCollectionDeserializer(CollectionType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findCollectionDeserializer.

We have plenty of collection types to support...

Annotations
@Override
findMapDeserializerback to summary
public ValueDeserializer<?> findMapDeserializer(MapType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer valueTypeDeserializer, ValueDeserializer<?> valueDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findMapDeserializer.

A few Map types to support.

Annotations
@Override
findMapLikeDeserializerback to summary
public ValueDeserializer<?> findMapLikeDeserializer(MapLikeType type, DeserializationConfig config, BeanDescription.Supplier beanDescRef, KeyDeserializer keyDeserializer, TypeDeserializer elementTypeDeserializer, ValueDeserializer<?> elementDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findMapLikeDeserializer.

Doc from tools.jackson.databind.deser.Deserializers.findMapLikeDeserializer.

Method called to locate deserializer for specified "Map-like" type (one that acts like java.util.Map but does not implement it).

Deserializer for element type may be passed, if configured explicitly at higher level (by annotations, typically), but usually are not. Type deserializer for element is passed if one is needed based on contextual information (annotations on declared element class; or on field or method type is associated with).

Similarly, a KeyDeserializer may be passed, but this is only done if there is a specific configuration override (annotations) to indicate instance to use. Otherwise null is passed, and key deserializer needs to be obtained later during resolution, by deserializer constructed here.

Annotations
@Override
findReferenceDeserializerback to summary
public ValueDeserializer<?> findReferenceDeserializer(ReferenceType refType, DeserializationConfig config, BeanDescription.Supplier beanDescRef, TypeDeserializer contentTypeDeserializer, ValueDeserializer<?> contentDeserializer)

Overrides default tools.jackson.databind.deser.Deserializers.findReferenceDeserializer.

Doc from tools.jackson.databind.deser.Deserializers.findReferenceDeserializer.

Method called to locate deserializer for value that is of referential type,

Annotations
@Override
hasDeserializerForback to summary
public boolean hasDeserializerFor(DeserializationConfig config, Class<?> valueType)

Implements abstract tools.jackson.databind.deser.Deserializers.Base.hasDeserializerFor.

Implements tools.jackson.databind.deser.Deserializers.hasDeserializerFor.

Doc from tools.jackson.databind.deser.Deserializers.hasDeserializerFor.

Method that may be called to check whether this deserializer provider would provide deserializer for values of given type, without attempting to construct (and possibly fail in some cases) actual deserializer. Mostly needed to support validation of polymorphic type ids.

Note

implementations should take care NOT to claim supporting types that they do not recognize as this could to incorrect assumption of safe support by caller.

Annotations
@Override
requireCollectionOfComparableElementsback to summary
private void requireCollectionOfComparableElements(CollectionType actualType, String targetType)