| 程序包 | 说明 |
|---|---|
| com.google.gson |
This package provides the
Gson class to convert Json to Java and
vice-versa. |
| com.google.gson.internal |
Do NOT use any class in this package as they are meant for internal use in Gson.
|
| com.google.gson.internal.bind |
| 限定符和类型 | 方法和说明 |
|---|---|
<T> TypeAdapter<T> |
TypeAdapterFactory.create(Gson gson,
TypeToken<T> type)
Returns a type adapter for
type, or null if this factory doesn't
support type. |
<T> TypeAdapter<T> |
Gson.getAdapter(Class<T> type)
Returns the type adapter for
type. |
<T> TypeAdapter<T> |
Gson.getAdapter(TypeToken<T> type)
Returns the type adapter for
type. |
<T> TypeAdapter<T> |
Gson.getDelegateAdapter(TypeAdapterFactory skipPast,
TypeToken<T> type)
This method is used to get an alternate type adapter for the specified type.
|
TypeAdapter<T> |
TypeAdapter.nullSafe()
This wrapper method is used to make a type adapter null tolerant.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> TypeAdapter<T> |
Excluder.create(Gson gson,
TypeToken<T> type) |
| 限定符和类型 | 类和说明 |
|---|---|
class |
ArrayTypeAdapter<E>
Adapt an array of objects.
|
class |
DateTypeAdapter
Adapter for Date.
|
class |
ObjectTypeAdapter
Adapts types whose static type is only 'Object'.
|
class |
ReflectiveTypeAdapterFactory.Adapter<T> |
class |
SqlDateTypeAdapter
Adapter for java.sql.Date.
|
class |
TimeTypeAdapter
Adapter for Time.
|
| 限定符和类型 | 方法和说明 |
|---|---|
<T> TypeAdapter<T> |
ReflectiveTypeAdapterFactory.create(Gson gson,
TypeToken<T> type) |
<T> TypeAdapter<T> |
MapTypeAdapterFactory.create(Gson gson,
TypeToken<T> typeToken) |
<T> TypeAdapter<T> |
CollectionTypeAdapterFactory.create(Gson gson,
TypeToken<T> typeToken) |
| 限定符和类型 | 方法和说明 |
|---|---|
static <TT> TypeAdapterFactory |
TypeAdapters.newFactory(Class<TT> unboxed,
Class<TT> boxed,
TypeAdapter<? super TT> typeAdapter) |
static <TT> TypeAdapterFactory |
TypeAdapters.newFactory(Class<TT> type,
TypeAdapter<TT> typeAdapter) |
static <TT> TypeAdapterFactory |
TypeAdapters.newFactory(TypeToken<TT> type,
TypeAdapter<TT> typeAdapter) |
static <TT> TypeAdapterFactory |
TypeAdapters.newFactoryForMultipleTypes(Class<TT> base,
Class<? extends TT> sub,
TypeAdapter<? super TT> typeAdapter) |
static <TT> TypeAdapterFactory |
TypeAdapters.newTypeHierarchyFactory(Class<TT> clazz,
TypeAdapter<TT> typeAdapter) |
| 构造器和说明 |
|---|
ArrayTypeAdapter(Gson context,
TypeAdapter<E> componentTypeAdapter,
Class<E> componentType) |
Copyright © 2015. All Rights Reserved.