Top Description Fields Constructors Methods
tools.jackson.databind.ext.javatime.ser

public Class YearSerializer

extends JSR310FormattedSerializerBase<Year>
Class Inheritance
Imports
java.time.Year, java.time.format.DateTimeFormatter, com.fasterxml.jackson.annotation.JsonFormat, tools.jackson.core.JacksonException, .JsonGenerator, .JsonParser, .JsonToken, tools.jackson.databind.JavaType, .SerializationContext, tools.jackson.databind.jsonFormatVisitors.JsonFormatVisitorWrapper, .JsonIntegerFormatVisitor

Serializer for Java 8 temporal Years.
Author
Nick Williams

Field Summary

Modifier and TypeField and Description
public static final YearSerializer
Inherited from tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase:
_formatter_integerListType_shape_useNanoseconds_useTimestamp

Constructor Summary

AccessConstructor and Description
protected
public
protected

Method Summary

Modifier and TypeMethod and Description
protected void
protected JsonToken
serializationShape(SerializationContext ctxt)

Implements abstract tools.jackson.databind.ext.javatime.ser.JSR310SerializerBase.serializationShape.

Overridable helper method used from serializeWithType, to indicate shape of value during serialization; needed to know how type id is to be serialized.

public void
serialize(Year year, JsonGenerator generator, SerializationContext ctxt)

Implements abstract tools.jackson.databind.ser.std.StdSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

protected boolean
protected YearSerializer
Inherited from tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase:
_integerListType_useDateTimeFormatter_useTimestampExplicitOnlyacceptJsonFormatVisitorcreateContextualgetTimestampsFeatureuseNanosecondsuseTimestampwithFeatures

Field Detail

INSTANCEback to summary
public static final YearSerializer INSTANCE

Constructor Detail

YearSerializerback to summary
protected YearSerializer()
YearSerializerback to summary
public YearSerializer(DateTimeFormatter formatter)
YearSerializerback to summary
protected YearSerializer(YearSerializer base, DateTimeFormatter dtf, Boolean useTimestamp)

Method Detail

_acceptTimestampVisitorback to summary
protected void _acceptTimestampVisitor(JsonFormatVisitorWrapper visitor, JavaType typeHint)

Overrides tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase._acceptTimestampVisitor.

Annotations
@Override
serializationShapeback to summary
protected JsonToken serializationShape(SerializationContext ctxt)

Implements abstract tools.jackson.databind.ext.javatime.ser.JSR310SerializerBase.serializationShape.

Doc from tools.jackson.databind.ext.javatime.ser.JSR310SerializerBase.serializationShape.

Overridable helper method used from serializeWithType, to indicate shape of value during serialization; needed to know how type id is to be serialized.

Annotations
@Override
serializeback to summary
public void serialize(Year year, JsonGenerator generator, SerializationContext ctxt) throws JacksonException

Implements abstract tools.jackson.databind.ser.std.StdSerializer.serialize.

Doc from tools.jackson.databind.ValueSerializer.serialize.

Method that can be called to ask implementation to serialize values of type this serializer handles.

Annotations
@Override
useTimestampFromGlobalDefaultsback to summary
protected boolean useTimestampFromGlobalDefaults(SerializationContext ctxt)

Overrides tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase.useTimestampFromGlobalDefaults.

Annotations
@Override
withFormatback to summary
protected YearSerializer withFormat(DateTimeFormatter dtf, Boolean useTimestamp, JsonFormat.Shape shape)

Implements abstract tools.jackson.databind.ext.javatime.ser.JSR310FormattedSerializerBase.withFormat.

Annotations
@Override