ContainerSerializerBase (Jackson JSON Processor)
Date: 2013-07-14

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 and Description
    --- | ---
    `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

    Methods
    Modifier and Type | Method and 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 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)