private static final class TreeTypeAdapter.SingleTypeFactory extends java.lang.Object implements TypeAdapterFactory
| Modifier and Type | Field and Description |
|---|---|
private JsonDeserializer<?> |
deserializer |
private TypeToken<?> |
exactType |
private java.lang.Class<?> |
hierarchyType |
private boolean |
matchRawType |
private JsonSerializer<?> |
serializer |
| Constructor and Description |
|---|
SingleTypeFactory(java.lang.Object typeAdapter,
TypeToken<?> exactType,
boolean matchRawType,
java.lang.Class<?> hierarchyType) |
| Modifier and Type | Method and Description |
|---|---|
<T> TypeAdapter<T> |
create(Gson gson,
TypeToken<T> type)
Returns a type adapter for
type, or null if this factory doesn't
support type. |
private final TypeToken<?> exactType
private final boolean matchRawType
private final java.lang.Class<?> hierarchyType
private final JsonSerializer<?> serializer
private final JsonDeserializer<?> deserializer
SingleTypeFactory(java.lang.Object typeAdapter,
TypeToken<?> exactType,
boolean matchRawType,
java.lang.Class<?> hierarchyType)
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
TypeAdapterFactorytype, or null if this factory doesn't
support type.create in interface TypeAdapterFactory