org.codehaus.jackson.map.ser
Class SerializerBase<T>

java.lang.Object
  extended by org.codehaus.jackson.map.JsonSerializer<T>
      extended by org.codehaus.jackson.map.ser.SerializerBase<T>
All Implemented Interfaces:
SchemaAware
Direct Known Subclasses:
ArraySerializers.BooleanArraySerializer, ArraySerializers.ByteArraySerializer, ArraySerializers.CharArraySerializer, ArraySerializers.DoubleArraySerializer, ArraySerializers.FloatArraySerializer, ArraySerializers.IntArraySerializer, ArraySerializers.LongArraySerializer, ArraySerializers.ObjectArraySerializer, ArraySerializers.ShortArraySerializer, ArraySerializers.StringArraySerializer, BasicSerializerFactory.BooleanSerializer, BasicSerializerFactory.CalendarSerializer, BasicSerializerFactory.ClassSerializer, BasicSerializerFactory.DoubleSerializer, BasicSerializerFactory.EnumSerializer, BasicSerializerFactory.FloatSerializer, BasicSerializerFactory.IntegerSerializer, BasicSerializerFactory.IntLikeSerializer, BasicSerializerFactory.LongSerializer, BasicSerializerFactory.NullSerializer, BasicSerializerFactory.NumberSerializer, BasicSerializerFactory.SerializableSerializer, BasicSerializerFactory.SqlDateSerializer, BasicSerializerFactory.SqlTimeSerializer, BasicSerializerFactory.StringLikeSerializer, BasicSerializerFactory.StringSerializer, BasicSerializerFactory.UtilDateSerializer, ContainerSerializers.CollectionSerializer, ContainerSerializers.EnumMapSerializer, ContainerSerializers.EnumSetSerializer, ContainerSerializers.IndexedListSerializer, ContainerSerializers.IterableSerializer, ContainerSerializers.IteratorSerializer, ContainerSerializers.MapSerializer

public abstract class SerializerBase<T>
extends JsonSerializer<T>
implements SchemaAware

Base class used by all standard serializers. Provides some convenience methods for implementing SchemaAware


Nested Class Summary
 
Nested classes/interfaces inherited from class org.codehaus.jackson.map.JsonSerializer
JsonSerializer.None
 
Constructor Summary
SerializerBase()
           
 
Method Summary
protected  ObjectNode createObjectNode()
           
protected  ObjectNode createSchemaNode(String type)
           
protected  ObjectNode createSchemaNode(String type, boolean isOptional)
           
abstract  JsonNode getSchema(SerializerProvider provider, Type typeHint)
          Get the representation of the schema to which this serializer will conform.
 
Methods inherited from class org.codehaus.jackson.map.JsonSerializer
serialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializerBase

public SerializerBase()
Method Detail

getSchema

public abstract JsonNode getSchema(SerializerProvider provider,
                                   Type typeHint)
                            throws JsonMappingException
Description copied from interface: SchemaAware
Get the representation of the schema to which this serializer will conform.

Specified by:
getSchema in interface SchemaAware
Parameters:
provider - The serializer provider.
typeHint - A hint about the type.
Returns:
Json-schema for this serializer.
Throws:
JsonMappingException

createObjectNode

protected ObjectNode createObjectNode()

createSchemaNode

protected ObjectNode createSchemaNode(String type)

createSchemaNode

protected ObjectNode createSchemaNode(String type,
                                      boolean isOptional)