public class InstantTypeSerializer extends AbstractDateTimeSerializer<Instant>
Instant type.UTCmodel| Constructor | Description |
|---|---|
InstantTypeSerializer(JsonBindingModel model) |
Construct serializer with its class.
|
| Modifier and Type | Method | Description |
|---|---|---|
protected String |
formatDefault(Instant value,
Locale locale) |
Format with default formatter for a given
java.time date object. |
protected String |
formatStrictIJson(Instant value) |
Format date object as strict IJson date format.
|
protected String |
formatWithFormatter(Instant value,
DateTimeFormatter formatter) |
Format date object with given formatter
|
protected Instant |
toInstant(Instant value) |
Convert java.time object to epoch milliseconds instant.
|
getJsonbDateFormatter, getZonedFormatter, serialize, serialize, toJson, toTemporalAccessorpublic InstantTypeSerializer(JsonBindingModel model)
model - Binding model.protected Instant toInstant(Instant value)
AbstractDateTimeSerializertoInstant in class AbstractDateTimeSerializer<Instant>value - date object to convertprotected String formatDefault(Instant value, Locale locale)
AbstractDateTimeSerializerjava.time date object.
Different default formatter for each date object type is used.formatDefault in class AbstractDateTimeSerializer<Instant>value - date objectlocale - locale from annotation / default not nullprotected String formatWithFormatter(Instant value, DateTimeFormatter formatter)
AbstractDateTimeSerializerformatWithFormatter in class AbstractDateTimeSerializer<Instant>value - date object to formatformatter - formatter to format withprotected String formatStrictIJson(Instant value)
AbstractDateTimeSerializerformatStrictIJson in class AbstractDateTimeSerializer<Instant>value - value to formatCopyright © 2017 Oracle Corporation. All rights reserved.