Class GsonObjectMapper.DateTimeAdapter<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.util.List<java.time.format.DateTimeFormatter> FORMATS  
      (package private) static java.time.format.DateTimeFormatter FORMATTER  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DateTimeAdapter()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      T deserialize​(com.google.gson.JsonElement jsonElement, java.lang.reflect.Type type, com.google.gson.JsonDeserializationContext jsonDeserializationContext)  
      (package private) abstract T from​(java.lang.Long millies)  
      (package private) abstract T from​(java.time.temporal.TemporalAccessor dt)  
      com.google.gson.JsonElement serialize​(T dateObj, java.lang.reflect.Type type, com.google.gson.JsonSerializationContext jsonSerializationContext)  
      • Methods inherited from class java.lang.Object

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

      • FORMATTER

        static final java.time.format.DateTimeFormatter FORMATTER
      • FORMATS

        static final java.util.List<java.time.format.DateTimeFormatter> FORMATS
    • Constructor Detail

      • DateTimeAdapter

        private DateTimeAdapter()
    • Method Detail

      • from

        abstract T from​(java.lang.Long millies)
      • from

        abstract T from​(java.time.temporal.TemporalAccessor dt)
      • deserialize

        public T deserialize​(com.google.gson.JsonElement jsonElement,
                             java.lang.reflect.Type type,
                             com.google.gson.JsonDeserializationContext jsonDeserializationContext)
                      throws com.google.gson.JsonParseException
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<T>
        Throws:
        com.google.gson.JsonParseException
      • serialize

        public com.google.gson.JsonElement serialize​(T dateObj,
                                                     java.lang.reflect.Type type,
                                                     com.google.gson.JsonSerializationContext jsonSerializationContext)
        Specified by:
        serialize in interface com.google.gson.JsonSerializer<T>