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

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.IndexedListSerializer
All Implemented Interfaces:
ResolvableSerializer, SchemaAware
Enclosing class:
ContainerSerializers

public static class ContainerSerializers.IndexedListSerializer
extends ContainerSerializerBase<T>

This is an optimizied serializer for Lists that can be efficiently traversed by index (as opposed to others, such as LinkedList that can not}.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
JsonSerializer.None
 
Field Summary
static ContainerSerializers.IndexedListSerializer instance
           
 
Fields inherited from class org.codehaus.jackson.map.ser.SerializerBase
_handledType
 
Constructor Summary
ContainerSerializers.IndexedListSerializer(JavaType elemType, boolean staticTyping, TypeSerializer vts)
           
 
Method Summary
 ContainerSerializerBase<?> _withValueTypeSerializer(TypeSerializer vts)
           
 void serializeContents(List<?> value, JsonGenerator jgen, SerializerProvider provider)
           
 void serializeContentsUsing(List<?> value, JsonGenerator jgen, SerializerProvider provider, JsonSerializer<Object> ser)
           
 void serializeTypedContents(List<?> value, JsonGenerator jgen, SerializerProvider provider)
           
 
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.IndexedListSerializer instance
Constructor Detail

ContainerSerializers.IndexedListSerializer

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

_withValueTypeSerializer

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

serializeContents

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

serializeContentsUsing

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

serializeTypedContents

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