com.fasterxml.jackson.databind.deser.std.AtomicReferenceDeserializer 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 com.fasterxml.jackson.databind.deser.std;
import java.io.IOException;
import java.util.concurrent.atomic.AtomicReference;
import com.fasterxml.jackson.core.*;
import com.fasterxml.jackson.databind.*;
import com.fasterxml.jackson.databind.deser.ContextualDeserializer;
import com.fasterxml.jackson.databind.jsontype.TypeDeserializer;
public class AtomicReferenceDeserializer
extends StdDeserializer>
implements ContextualDeserializer
{
private static final long serialVersionUID = 1L;
/**
* Type of value that we reference
*/
protected final JavaType _referencedType;
protected final TypeDeserializer _valueTypeDeserializer;
protected final JsonDeserializer> _valueDeserializer;
/**
* @param referencedType Parameterization of this reference
*/
public AtomicReferenceDeserializer(JavaType referencedType) {
this(referencedType, null, null);
}
public AtomicReferenceDeserializer(JavaType referencedType,
TypeDeserializer typeDeser, JsonDeserializer> deser)
{
super(AtomicReference.class);
_referencedType = referencedType;
_valueDeserializer = deser;
_valueTypeDeserializer = typeDeser;
}
public AtomicReferenceDeserializer withResolved(TypeDeserializer typeDeser,
JsonDeserializer> valueDeser)
{
return new AtomicReferenceDeserializer(_referencedType,
typeDeser, valueDeser);
}
// Added in 2.3
@Override
public AtomicReference> getNullValue() {
return new AtomicReference