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.
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 com.fasterxml.jackson.databind.deser;
import java.util.LinkedHashMap;
import com.fasterxml.jackson.annotation.ObjectIdGenerator;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.annotation.NoClass;
import com.fasterxml.jackson.databind.cfg.HandlerInstantiator;
import com.fasterxml.jackson.databind.deser.impl.ReadableObjectId;
import com.fasterxml.jackson.databind.introspect.Annotated;
import com.fasterxml.jackson.databind.util.ClassUtil;
/**
* Complete {@link DeserializationContext} implementation that adds
* extended API for {@link ObjectMapper} (and {@link ObjectReader})
* to call, as well as implements certain parts that base class
* has left abstract.
* The remaining abstract methods ({@link #createInstance}, {@link #with})
* are left so that custom implementations will properly implement them
* to return intended subtype.
*/
public abstract class DefaultDeserializationContext
extends DeserializationContext
implements java.io.Serializable // since 2.1
{
private static final long serialVersionUID = 1L;
protected transient LinkedHashMap _objectIds;
/**
* Constructor that will pass specified deserializer factory and
* cache: cache may be null (in which case default implementation
* will be used), factory can not be null
*/
protected DefaultDeserializationContext(DeserializerFactory df, DeserializerCache cache) {
super(df, cache);
}
protected DefaultDeserializationContext(DefaultDeserializationContext src,
DeserializationConfig config, JsonParser jp, InjectableValues values) {
super(src, config, jp, values);
}
protected DefaultDeserializationContext(DefaultDeserializationContext src,
DeserializerFactory factory) {
super(src, factory);
}
/*
/**********************************************************
/* Abstract methods impls, Object Id
/**********************************************************
*/
@Override
public ReadableObjectId findObjectId(Object id,
ObjectIdGenerator> generator)
{
final ObjectIdGenerator.IdKey key = generator.key(id);
if (_objectIds == null) {
_objectIds = new LinkedHashMap();
} else {
ReadableObjectId entry = _objectIds.get(key);
if (entry != null) {
return entry;
}
}
ReadableObjectId entry = new ReadableObjectId(id);
_objectIds.put(key, entry);
return entry;
}
/*
/**********************************************************
/* Abstract methods impls, other factory methods
/**********************************************************
*/
@SuppressWarnings("unchecked")
@Override
public JsonDeserializer