org.codehaus.jackson.map.ser
Class ContainerSerializers.CollectionSerializer

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
      extended by org.codehaus.jackson.map.ser.SerializerBase<T>
          extended by org.codehaus.jackson.map.ser.ContainerSerializerBase<T>
              extended by org.codehaus.jackson.map.ser.ContainerSerializers.CollectionSerializer
All Implemented Interfaces:
ResolvableSerializer, SchemaAware
Enclosing class:
ContainerSerializers

public static class ContainerSerializers.CollectionSerializer
extends ContainerSerializerBase<T>

Fallback serializer for cases where Collection is not known to be of type for which more specializer serializer exists (such as index-accessible List). If so, we will just construct an Iterator to iterate over elements.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
JsonSerializer.None
 
Field Summary
static ContainerSerializers.CollectionSerializer instance
           
 
Fields inherited from class org.codehaus.jackson.map.ser.SerializerBase
_handledType
 
Constructor Summary
ContainerSerializers.CollectionSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts)
           
 
Method Summary
 ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)
           
 void serializeContents(Collection<?> value, JsonGenerator jgen, SerializerProvider provider)
           
 void serializeContentsUsing(Collection<?> value, JsonGenerator jgen, SerializerProvider provider, JsonSerializer<Object> ser)
           
 
Methods inherited from class org.codehaus.jackson.map.ser.ContainerSerializerBase
withValueTypeSerializer
 
Methods inherited from class org.codehaus.jackson.map.ser.SerializerBase
createObjectNode, createSchemaNode, createSchemaNode, handledType, wrapAndThrow, wrapAndThrow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

instance

public static final ContainerSerializers.CollectionSerializer instance
Constructor Detail

ContainerSerializers.CollectionSerializer

public ContainerSerializers.CollectionSerializer(JavaType elemType,
                                                 boolean staticTyping,
                                                 TypeSerializer vts)
Method Detail

_withValueTypeSerializer

public ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)
Specified by:
_withValueTypeSerializer in class ContainerSerializerBase<Collection<?>>

serializeContents

public void serializeContents(Collection<?> value,
                              JsonGenerator jgen,
                              SerializerProvider provider)
                       throws IOException,
                              JsonGenerationException
Throws:
IOException
JsonGenerationException

serializeContentsUsing

public void serializeContentsUsing(Collection<?> value,
                                   JsonGenerator jgen,
                                   SerializerProvider provider,
                                   JsonSerializer<Object> ser)
                            throws IOException,
                                   JsonGenerationException
Throws:
IOException
JsonGenerationException