Class JacksonJodaDateFormat
java.lang.Object
com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaFormatBase
com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaDateFormat
Simple container used to encapsulate (some of) gory details of
customizations related to date/time formatting.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final BooleanFlag forJsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONEprotected final booleanprotected final org.joda.time.format.DateTimeFormatterprotected final org.joda.time.format.DateTimeFormatterprotected final TimeZoneprotected org.joda.time.DateTimeZoneprotected final BooleanFlag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_IDprivate static final StringFields inherited from class com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaFormatBase
_explicitLocale, _locale, _useTimestamp, DEFAULT_LOCALE -
Constructor Summary
ConstructorsModifierConstructorDescriptionJacksonJodaDateFormat(JacksonJodaDateFormat base, Boolean useTimestamp) protectedJacksonJodaDateFormat(JacksonJodaDateFormat base, Boolean adjustToContextTZOverride, Boolean writeZoneId) JacksonJodaDateFormat(JacksonJodaDateFormat base, Locale locale) JacksonJodaDateFormat(JacksonJodaDateFormat base, TimeZone jdkTimezone) JacksonJodaDateFormat(JacksonJodaDateFormat base, org.joda.time.format.DateTimeFormatter formatter) JacksonJodaDateFormat(org.joda.time.format.DateTimeFormatter defaultFormatter) -
Method Summary
Modifier and TypeMethodDescriptionprotected static booleanorg.joda.time.format.DateTimeFormattercreateFormatter(com.fasterxml.jackson.databind.SerializerProvider ctxt) org.joda.time.format.DateTimeFormattercreateFormatterWithLocale(com.fasterxml.jackson.databind.SerializerProvider ctxt) org.joda.time.format.DateTimeFormattercreateParser(com.fasterxml.jackson.databind.DeserializationContext ctxt) Accessor used during deserialization.org.joda.time.DateTimeZonebooleanDifferentiate if TimeZone is specified by callerorg.joda.time.format.DateTimeFormatterbooleanshouldAdjustToContextTimeZone(com.fasterxml.jackson.databind.DeserializationContext ctxt) booleanshouldWriteWithZoneId(com.fasterxml.jackson.databind.SerializerProvider ctxt) toString()with(com.fasterxml.jackson.annotation.JsonFormat.Value ann) withAdjustToContextTZOverride(Boolean adjustToContextTZOverride) withFormat(String format) withLocale(Locale locale) withTimeZone(TimeZone tz) withUseTimestamp(Boolean useTimestamp) withWriteZoneId(Boolean writeZoneId) Methods inherited from class com.fasterxml.jackson.datatype.joda.cfg.JacksonJodaFormatBase
useTimestamp
-
Field Details
-
JODA_STYLE_CHARS
- See Also:
-
_formatter
protected final org.joda.time.format.DateTimeFormatter _formatter -
_formatterWithOffsetParsed
protected final org.joda.time.format.DateTimeFormatter _formatterWithOffsetParsed -
_jdkTimezone
-
_jodaTimezone
protected transient org.joda.time.DateTimeZone _jodaTimezone -
_explicitTimezone
protected final boolean _explicitTimezone -
_adjustToContextTZOverride
Flag forJsonFormat.Feature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE- Since:
- 2.8
-
_writeZoneId
Flag forJsonFormat.Feature.WRITE_DATES_WITH_ZONE_ID- Since:
- 2.8
-
-
Constructor Details
-
JacksonJodaDateFormat
public JacksonJodaDateFormat(org.joda.time.format.DateTimeFormatter defaultFormatter) -
JacksonJodaDateFormat
-
JacksonJodaDateFormat
public JacksonJodaDateFormat(JacksonJodaDateFormat base, org.joda.time.format.DateTimeFormatter formatter) -
JacksonJodaDateFormat
-
JacksonJodaDateFormat
-
JacksonJodaDateFormat
protected JacksonJodaDateFormat(JacksonJodaDateFormat base, Boolean adjustToContextTZOverride, Boolean writeZoneId) - Since:
- 2.8
-
-
Method Details
-
with
-
withUseTimestamp
-
withFormat
-
withTimeZone
-
withLocale
-
withAdjustToContextTZOverride
- Since:
- 2.8
-
withWriteZoneId
- Since:
- 2.8
-
getTimeZone
public org.joda.time.DateTimeZone getTimeZone()- Since:
- 2.6
-
getLocale
-
rawFormatter
public org.joda.time.format.DateTimeFormatter rawFormatter() -
createFormatter
public org.joda.time.format.DateTimeFormatter createFormatter(com.fasterxml.jackson.databind.SerializerProvider ctxt) -
createFormatterWithLocale
public org.joda.time.format.DateTimeFormatter createFormatterWithLocale(com.fasterxml.jackson.databind.SerializerProvider ctxt) -
createParser
public org.joda.time.format.DateTimeFormatter createParser(com.fasterxml.jackson.databind.DeserializationContext ctxt) Accessor used during deserialization. -
shouldAdjustToContextTimeZone
public boolean shouldAdjustToContextTimeZone(com.fasterxml.jackson.databind.DeserializationContext ctxt) - Since:
- 2.8
-
shouldWriteWithZoneId
public boolean shouldWriteWithZoneId(com.fasterxml.jackson.databind.SerializerProvider ctxt) - Since:
- 2.8
-
isTimezoneExplicit
public boolean isTimezoneExplicit()Differentiate if TimeZone is specified by caller- Returns:
- true if TimeZone is specified by caller; false otherwise.
-
_isStyle
-
toString
-