org.codehaus.jackson.map.DeserializerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ehcache Show documentation
Show all versions of ehcache Show documentation
Ehcache is an open source, standards-based cache used to boost performance,
offload the database and simplify scalability. Ehcache is robust, proven and full-featured and
this has made it the most widely-used Java-based cache.
package org.codehaus.jackson.map;
import org.codehaus.jackson.io.SerializedString;
import org.codehaus.jackson.map.deser.BeanDeserializerModifier;
import org.codehaus.jackson.map.deser.ValueInstantiators;
import org.codehaus.jackson.type.JavaType;
/**
* Abstract class that defines API used by {@link ObjectMapper} and
* {@link JsonDeserializer}s to obtain deserializers capable of
* re-constructing instances of handled type from JSON content.
*/
public abstract class DeserializerProvider
{
protected DeserializerProvider() { }
/*
/**********************************************************
/* Fluent factory methods
/**********************************************************
*/
/**
* Method that sub-classes need to override, to ensure that fluent-factory
* methods will produce proper sub-type.
*
* @since 1.9
*/
public abstract DeserializerProvider withFactory(DeserializerFactory factory);
/**
* Method that is to configure {@link DeserializerFactory} that provider has
* to use specified deserializer provider, with highest precedence (that is,
* additional providers have higher precedence than default one or previously
* added ones)
*
* @since 1.7
*/
public abstract DeserializerProvider withAdditionalDeserializers(Deserializers d);
/**
* @since 1.8
*/
public abstract DeserializerProvider withAdditionalKeyDeserializers(KeyDeserializers d);
/**
* @since 1.7
*/
public abstract DeserializerProvider withDeserializerModifier(BeanDeserializerModifier modifier);
/**
* @since 1.8
*/
public abstract DeserializerProvider withAbstractTypeResolver(AbstractTypeResolver resolver);
/**
* Method that will construct a new instance with specified additional value instantiators
* (i.e. does NOT replace existing ones)
*
* @since 1.9
*/
public abstract DeserializerProvider withValueInstantiators(ValueInstantiators instantiators);
/*
/**********************************************************
/* General deserializer locating method
/**********************************************************
*/
/**
* Method called to get hold of a deserializer for a value of given type;
* or if no such deserializer can be found, a default handler (which
* may do a best-effort generic serialization or just simply
* throw an exception when invoked).
*
* Note: this method is only called for value types; not for keys.
* Key deserializers can be accessed using {@link #findKeyDeserializer}.
*
* @param config Deserialization configuration
* @param propertyType Declared type of the value to deserializer (obtained using
* 'setter' method signature and/or type annotations
* @param property Object that represents accessor for property value; field,
* setter method or constructor parameter.
*
* @throws JsonMappingException if there are fatal problems with
* accessing suitable deserializer; including that of not
* finding any serializer
*/
public abstract JsonDeserializer