AndBase开发框架  1.6
 全部  命名空间 文件 函数 变量 枚举值 
Public 成员函数 | 静态 Public 属性 | Private 成员函数 | 静态 Private 成员函数 | Private 属性 | 所有成员列表
com.google.gson.internal.bind.DateTypeAdapter类 参考
类 com.google.gson.internal.bind.DateTypeAdapter 继承关系图:

Public 成员函数

Date read (JsonReader in) throws IOException
 
synchronized void write (JsonWriter out, Date value) throws IOException
 

静态 Public 属性

static final TypeAdapterFactory FACTORY
 

Private 成员函数

synchronized Date deserializeToDate (String json)
 

静态 Private 成员函数

static DateFormat buildIso8601Format ()
 

Private 属性

final DateFormat enUsFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.US)
 
final DateFormat localFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT)
 
final DateFormat iso8601Format = buildIso8601Format()
 

详细描述

Adapter for Date. Although this class appears stateless, it is not. DateFormat captures its time zone and locale when it is created, which gives this class state. DateFormat isn't thread safe either, so this class has to synchronize its read and write methods.

成员函数说明

static DateFormat com.google.gson.internal.bind.DateTypeAdapter.buildIso8601Format ( )
inlinestaticprivate
synchronized Date com.google.gson.internal.bind.DateTypeAdapter.deserializeToDate ( String  json)
inlineprivate
Date com.google.gson.internal.bind.DateTypeAdapter.read ( JsonReader  in) throws IOException
inline
synchronized void com.google.gson.internal.bind.DateTypeAdapter.write ( JsonWriter  out,
Date  value 
) throws IOException
inline

类成员变量说明

final DateFormat com.google.gson.internal.bind.DateTypeAdapter.enUsFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT, Locale.US)
private
final TypeAdapterFactory com.google.gson.internal.bind.DateTypeAdapter.FACTORY
static
初始值:
= new TypeAdapterFactory() {
@SuppressWarnings("unchecked")
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> typeToken) {
return typeToken.getRawType() == Date.class ? (TypeAdapter<T>) new DateTypeAdapter() : null;
}
}
final DateFormat com.google.gson.internal.bind.DateTypeAdapter.iso8601Format = buildIso8601Format()
private
final DateFormat com.google.gson.internal.bind.DateTypeAdapter.localFormat = DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.DEFAULT)
private

该类的文档由以下文件生成: