Class JodaDateSerializerBase<T>

java.lang.Object
com.fasterxml.jackson.databind.JsonSerializer<T>
com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
com.fasterxml.jackson.datatype.joda.ser.JodaSerializerBase<T>
com.fasterxml.jackson.datatype.joda.ser.JodaDateSerializerBase<T>
All Implemented Interfaces:
com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable, com.fasterxml.jackson.databind.jsonschema.SchemaAware, com.fasterxml.jackson.databind.ser.ContextualSerializer, Serializable
Direct Known Subclasses:
DateMidnightSerializer, DateTimeSerializer, DurationSerializer, InstantSerializer, IntervalSerializer, LocalDateSerializer, LocalDateTimeSerializer, LocalTimeSerializer, MonthDaySerializer, YearMonthSerializer

public abstract class JodaDateSerializerBase<T> extends JodaSerializerBase<T> implements com.fasterxml.jackson.databind.ser.ContextualSerializer
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.fasterxml.jackson.databind.JsonSerializer

    com.fasterxml.jackson.databind.JsonSerializer.None
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final int
    Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).
    protected final com.fasterxml.jackson.databind.SerializationFeature
     
    protected final JacksonJodaDateFormat
     
    protected final int
    Marker set to non-0 if (and only if) property or type override exists.
    protected static final int
     
    protected static final int
     
    protected static final int
     
    private static final long
     

    Fields inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _handledType
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, com.fasterxml.jackson.databind.SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected int
    _serializationShape(com.fasterxml.jackson.databind.SerializerProvider provider)
     
    void
    acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint)
     
    com.fasterxml.jackson.databind.JsonSerializer<?>
    createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property)
     
    com.fasterxml.jackson.databind.JsonNode
    getSchema(com.fasterxml.jackson.databind.SerializerProvider provider, Type typeHint)
    Deprecated.
    boolean
    isEmpty(com.fasterxml.jackson.databind.SerializerProvider prov, T value)
     
    withFormat(JacksonJodaDateFormat format, int shapeOverride)
     
    protected boolean
    writeWithZoneId(com.fasterxml.jackson.databind.SerializerProvider provider)
     

    Methods inherited from class com.fasterxml.jackson.datatype.joda.ser.JodaSerializerBase

    serializeWithType

    Methods inherited from class com.fasterxml.jackson.databind.ser.std.StdSerializer

    _neitherNull, _nonEmpty, createSchemaNode, createSchemaNode, findAnnotatedContentSerializer, findContextualConvertingSerializer, findConvertingContentSerializer, findFormatFeature, findFormatOverrides, findIncludeOverrides, findPropertyFilter, getSchema, handledType, isDefaultSerializer, serialize, visitArrayFormat, visitArrayFormat, visitFloatFormat, visitIntFormat, visitIntFormat, visitStringFormat, visitStringFormat, wrapAndThrow, wrapAndThrow

    Methods inherited from class com.fasterxml.jackson.databind.JsonSerializer

    getDelegatee, isEmpty, isUnwrappingSerializer, properties, replaceDelegatee, unwrappingSerializer, usesObjectId, withFilterId, withIgnoredProperties

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • FORMAT_STRING

      protected static final int FORMAT_STRING
      See Also:
    • FORMAT_TIMESTAMP

      protected static final int FORMAT_TIMESTAMP
      See Also:
    • FORMAT_ARRAY

      protected static final int FORMAT_ARRAY
      See Also:
    • _format

      protected final JacksonJodaDateFormat _format
    • _featureForNumeric

      protected final com.fasterxml.jackson.databind.SerializationFeature _featureForNumeric
    • _defaultNumericShape

      protected final int _defaultNumericShape
      Shape to use for generic "use numeric" feature (instead of more specific JsonFormat.shape).
      Since:
      2.9
    • _shapeOverride

      protected final int _shapeOverride
      Marker set to non-0 if (and only if) property or type override exists.
      Since:
      2.9
  • Constructor Details

    • JodaDateSerializerBase

      protected JodaDateSerializerBase(Class<T> type, JacksonJodaDateFormat format, com.fasterxml.jackson.databind.SerializationFeature numericFeature, int defaultNumericShape, int shapeOverride)
  • Method Details

    • withFormat

      public abstract JodaDateSerializerBase<T> withFormat(JacksonJodaDateFormat format, int shapeOverride)
      Since:
      2.9
    • isEmpty

      public boolean isEmpty(com.fasterxml.jackson.databind.SerializerProvider prov, T value)
      Overrides:
      isEmpty in class com.fasterxml.jackson.databind.JsonSerializer<T>
    • createContextual

      public com.fasterxml.jackson.databind.JsonSerializer<?> createContextual(com.fasterxml.jackson.databind.SerializerProvider prov, com.fasterxml.jackson.databind.BeanProperty property) throws com.fasterxml.jackson.databind.JsonMappingException
      Specified by:
      createContextual in interface com.fasterxml.jackson.databind.ser.ContextualSerializer
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • getSchema

      @Deprecated public com.fasterxml.jackson.databind.JsonNode getSchema(com.fasterxml.jackson.databind.SerializerProvider provider, Type typeHint)
      Deprecated.
      Specified by:
      getSchema in interface com.fasterxml.jackson.databind.jsonschema.SchemaAware
      Overrides:
      getSchema in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
    • acceptJsonFormatVisitor

      public void acceptJsonFormatVisitor(com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper visitor, com.fasterxml.jackson.databind.JavaType typeHint) throws com.fasterxml.jackson.databind.JsonMappingException
      Specified by:
      acceptJsonFormatVisitor in interface com.fasterxml.jackson.databind.jsonFormatVisitors.JsonFormatVisitable
      Overrides:
      acceptJsonFormatVisitor in class com.fasterxml.jackson.databind.ser.std.StdSerializer<T>
      Throws:
      com.fasterxml.jackson.databind.JsonMappingException
    • writeWithZoneId

      protected boolean writeWithZoneId(com.fasterxml.jackson.databind.SerializerProvider provider)
      Since:
      2.8
    • _serializationShape

      protected int _serializationShape(com.fasterxml.jackson.databind.SerializerProvider provider)
      Since:
      2.9