org.codehaus.jackson.map.ser.std
Class ContainerSerializerBase<T>

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
      extended by org.codehaus.jackson.map.ser.std.SerializerBase<T>
          extended by org.codehaus.jackson.map.ser.std.ContainerSerializerBase<T>
All Implemented Interfaces:
SchemaAware
Direct Known Subclasses:
AsArraySerializerBase, EnumMapSerializer, MapSerializer, StdArraySerializers.ArraySerializerBase

public abstract class ContainerSerializerBase<T>
extends SerializerBase<T>

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

Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
JsonSerializer.None
 
Field Summary
 
Fields inherited from class org.codehaus.jackson.map.ser.std.SerializerBase
_handledType
 
Constructor Summary
protected ContainerSerializerBase(Class<?> t, boolean dummy)
          Alternate constructor that is (alas!) needed to work around kinks of generic type handling
protected ContainerSerializerBase(Class<T> t)
           
 
Method Summary
abstract  ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)
           
 ContainerSerializerBase<?> withValueTypeSerializer(TypeSerializer vts)
          Factory(-like) method that can be used to construct a new container serializer that uses specified TypeSerializer for decorating contained values with additional type information.
 
Methods inherited from class org.codehaus.jackson.map.ser.std.SerializerBase
createObjectNode, createSchemaNode, createSchemaNode, getSchema, handledType, isDefaultSerializer, serialize, wrapAndThrow, wrapAndThrow, wrapAndThrow, wrapAndThrow
 
Methods inherited from class org.codehaus.jackson.map.JsonSerializer
isUnwrappingSerializer, serializeWithType, unwrappingSerializer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContainerSerializerBase

protected ContainerSerializerBase(Class<T> t)

ContainerSerializerBase

protected ContainerSerializerBase(Class<?> t,
                                  boolean dummy)
Alternate constructor that is (alas!) needed to work around kinks of generic type handling

Parameters:
t -
Method Detail

withValueTypeSerializer

public ContainerSerializerBase<?> withValueTypeSerializer(TypeSerializer vts)
Factory(-like) method that can be used to construct a new container serializer that uses specified TypeSerializer for decorating contained values with additional type information.

Parameters:
vts - Type serializer to use for contained values; can be null, in which case 'this' serializer is returned as is
Returns:
Serializer instance that uses given type serializer for values if that is possible (or if not, just 'this' serializer)

_withValueTypeSerializer

public abstract ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)