Package org.codehaus.jackson.map.ser.std
Class ContainerSerializerBase<T>
- java.lang.Object
-
- org.codehaus.jackson.map.JsonSerializer<T>
-
- org.codehaus.jackson.map.ser.std.SerializerBase<T>
-
- 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
Constructors Modifier Constructor Description protected
ContainerSerializerBase(java.lang.Class<?> t, boolean dummy)
Alternate constructor that is (alas!) needed to work around kinks of generic type handlingprotected
ContainerSerializerBase(java.lang.Class<T> t)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ContainerSerializerBase<?>
_withValueTypeSerializer(TypeSerializer vts)
ContainerSerializerBase<?>
withValueTypeSerializer(TypeSerializer vts)
Factory(-like) method that can be used to construct a new container serializer that uses specifiedTypeSerializer
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
-
-
-
-
Constructor Detail
-
ContainerSerializerBase
protected ContainerSerializerBase(java.lang.Class<T> t)
-
ContainerSerializerBase
protected ContainerSerializerBase(java.lang.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 specifiedTypeSerializer
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)
-
-