Class GsonObjectMapper.CalendarSerializer

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<java.util.Calendar>, com.google.gson.JsonSerializer<java.util.Calendar>
    Enclosing class:
    GsonObjectMapper

    private static class GsonObjectMapper.CalendarSerializer
    extends GsonObjectMapper.DateTimeAdapter<java.util.Calendar>
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CalendarSerializer()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) java.util.Calendar from​(java.lang.Long millies)  
      (package private) java.util.Calendar from​(java.time.temporal.TemporalAccessor dt)  
      com.google.gson.JsonElement serialize​(java.util.Calendar calendar, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)  
      private java.time.ZonedDateTime toZonedInstance​(java.time.temporal.TemporalAccessor dt)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CalendarSerializer

        private CalendarSerializer()
    • Method Detail

      • serialize

        public com.google.gson.JsonElement serialize​(java.util.Calendar calendar,
                                                     java.lang.reflect.Type type,
                                                     com.google.gson.JsonSerializationContext jsonSerializationContext)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<java.util.Calendar>
        Overrides:
        serialize in class GsonObjectMapper.DateTimeAdapter<java.util.Calendar>
      • toZonedInstance

        private java.time.ZonedDateTime toZonedInstance​(java.time.temporal.TemporalAccessor dt)