com.fasterxml.jackson.databind.ser.std
Class StaticListSerializerBase<T extends Collection<?>>

java.lang.Object
  extended by com.fasterxml.jackson.databind.JsonSerializer<T>
      extended by com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
          extended by com.fasterxml.jackson.databind.ser.std.StaticListSerializerBase<T>
All Implemented Interfaces:
SchemaAware
Direct Known Subclasses:
IndexedStringListSerializer, StringCollectionSerializer

public abstract class StaticListSerializerBase<T extends Collection<?>>
extends StdSerializer<T>

Intermediate base class for Lists, Collections and Arrays that contain static (non-dynamic) value types.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer
JsonSerializer.None
 
Field Summary
 
Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
_handledType
 
Constructor Summary
protected StaticListSerializerBase(Class<?> cls)
           
 
Method Summary
protected abstract  JsonNode contentSchema()
           
 JsonNode getSchema(SerializerProvider provider, Type typeHint)
          Default implementation simply claims type is "string"; usually overriden by custom serializers.
 boolean isEmpty(T value)
          Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).
 
Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer
createObjectNode, createSchemaNode, createSchemaNode, handledType, isDefaultSerializer, serialize, wrapAndThrow, wrapAndThrow
 
Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer
isUnwrappingSerializer, serializeWithType, unwrappingSerializer, usesObjectId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticListSerializerBase

protected StaticListSerializerBase(Class<?> cls)
Method Detail

isEmpty

public boolean isEmpty(T value)
Description copied from class: JsonSerializer
Method called to check whether given serializable value is considered "empty" value (for purposes of suppressing serialization of empty values).

Default implementation will consider only null values to be empty.

Overrides:
isEmpty in class JsonSerializer<T extends Collection<?>>

getSchema

public JsonNode getSchema(SerializerProvider provider,
                          Type typeHint)
Description copied from class: StdSerializer
Default implementation simply claims type is "string"; usually overriden by custom serializers.

Specified by:
getSchema in interface SchemaAware
Overrides:
getSchema in class StdSerializer<T extends Collection<?>>
Parameters:
provider - The serializer provider.
typeHint - A hint about the type.
Returns:
Json-schema for this serializer.

contentSchema

protected abstract JsonNode contentSchema()


Copyright © 2012 fasterxml.com. All Rights Reserved.