org.codehaus.jackson.map.ser.std.ContainerSerializerBase 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.ser.std;
import org.codehaus.jackson.map.TypeSerializer;
/**
* Intermediate base class for types that contain element(s) of
* other types. Used for example for List, Map, Object array and
* Iterator serializers.
*
* @since 1.5
*/
public abstract class ContainerSerializerBase
extends SerializerBase
{
/*
/**********************************************************
/* Construction, initialization
/**********************************************************
*/
protected ContainerSerializerBase(Class t) {
super(t);
}
/**
* Alternate constructor that is (alas!) needed to work
* around kinks of generic type handling
*
* @param t
*/
protected ContainerSerializerBase(Class> t, boolean dummy) {
super(t, dummy);
}
/**
* Factory(-like) method that can be used to construct a new container
* serializer that uses specified {@link TypeSerializer} for decorating
* contained values with additional type information.
*
* @param vts Type serializer to use for contained values; can be null,
* in which case 'this' serializer is returned as is
* @return Serializer instance that uses given type serializer for values if
* that is possible (or if not, just 'this' serializer)
*/
public ContainerSerializerBase> withValueTypeSerializer(TypeSerializer vts) {
if (vts == null) return this;
return _withValueTypeSerializer(vts);
}
public abstract ContainerSerializerBase> _withValueTypeSerializer(TypeSerializer vts);
}