Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.codehaus.jackson.map.deser;
import java.io.IOException;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonProcessingException;
import org.codehaus.jackson.map.*;
import org.codehaus.jackson.map.deser.BeanDeserializer;
import org.codehaus.jackson.map.introspect.AnnotatedClass;
import org.codehaus.jackson.map.type.*;
import org.codehaus.jackson.map.util.ClassUtil;
import org.codehaus.jackson.type.JavaType;
/**
* Default {@link DeserializerProvider} implementation.
* Handles low-level caching (non-root) aspects of deserializer
* handling; all construction details are delegated to configured
* {@link DeserializerFactory} instance that the provider owns.
*/
public class StdDeserializerProvider
extends DeserializerProvider
{
/*
/**********************************************************
/* Caching
/**********************************************************
*/
/**
* Set of available key deserializers is currently limited
* to standard types; and all known instances are storing
* in this map.
*/
final static HashMap _keyDeserializers = StdKeyDeserializers.constructAll();
/**
* We will also cache some dynamically constructed deserializers;
* specifically, ones that are expensive to construct.
* This currently means bean and Enum deserializers; array, List and Map
* deserializers will not be cached.
*
* Given that we don't expect much concurrency for additions
* (should very quickly converge to zero after startup), let's
* explicitly define a low concurrency setting.
*/
final protected ConcurrentHashMap> _cachedDeserializers
= new ConcurrentHashMap>(64, 0.75f, 2);
/**
* During deserializer construction process we may need to keep track of partially
* completed deserializers, to resolve cyclic dependencies. This is the
* map used for storing deserializers before they are fully complete.
*/
final protected HashMap> _incompleteDeserializers
= new HashMap>(8);
/*
/**********************************************************
/* Configuration
/**********************************************************
*/
/**
* Factory responsible for constructing actual deserializers, if not
* one of pre-configured types.
*/
protected DeserializerFactory _factory;
/*
/**********************************************************
/* Life-cycle
/**********************************************************
*/
/**
* Default constructor. Equivalent to calling
*
* new StdDeserializerProvider(BeanDeserializerFactory.instance);
*
*/
public StdDeserializerProvider() { this(BeanDeserializerFactory.instance); }
public StdDeserializerProvider(DeserializerFactory f) {
_factory = f;
}
@Override
public DeserializerProvider withAdditionalDeserializers(Deserializers d) {
_factory = _factory.withAdditionalDeserializers(d);
return this;
}
@Override
public DeserializerProvider withDeserializerModifier(BeanDeserializerModifier modifier) {
_factory = _factory.withDeserializerModifier(modifier);
return this;
}
/*
/**********************************************************
/* Abstract methods impls
/**********************************************************
*/
@SuppressWarnings("unchecked")
@Override
public JsonDeserializer