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
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
ConstructorsModifierConstructorDescriptionprotected
ContainerSerializerBase
(Class<?> t, boolean dummy) Alternate constructor that is (alas!) needed to work around kinks of generic type handlingprotected
-
Method Summary
Modifier and TypeMethodDescriptionabstract ContainerSerializerBase<?>
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 Details
-
ContainerSerializerBase
-
ContainerSerializerBase
Alternate constructor that is (alas!) needed to work around kinks of generic type handling- Parameters:
t
-
-
-
Method Details
-
withValueTypeSerializer
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
-