org.eclipse.egit.github.core.client
Class DateFormatter

java.lang.Object
  extended by org.eclipse.egit.github.core.client.DateFormatter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<Date>, com.google.gson.JsonSerializer<Date>

public class DateFormatter
extends Object
implements com.google.gson.JsonDeserializer<Date>, com.google.gson.JsonSerializer<Date>

Formatter for date formats present in the GitHub v2 and v3 API.


Constructor Summary
DateFormatter()
          Create date formatter
 
Method Summary
 Date deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context)
           
 com.google.gson.JsonElement serialize(Date date, Type type, com.google.gson.JsonSerializationContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateFormatter

public DateFormatter()
Create date formatter

Method Detail

deserialize

public Date deserialize(com.google.gson.JsonElement json,
                        Type typeOfT,
                        com.google.gson.JsonDeserializationContext context)
                 throws com.google.gson.JsonParseException
Specified by:
deserialize in interface com.google.gson.JsonDeserializer<Date>
Throws:
com.google.gson.JsonParseException

serialize

public com.google.gson.JsonElement serialize(Date date,
                                             Type type,
                                             com.google.gson.JsonSerializationContext context)
Specified by:
serialize in interface com.google.gson.JsonSerializer<Date>


Copyright © 2012. All Rights Reserved.