Package com.google.gson.internal.bind
Class TreeTypeAdapter.SingleTypeFactory
- java.lang.Object
-
- com.google.gson.internal.bind.TreeTypeAdapter.SingleTypeFactory
-
- All Implemented Interfaces:
TypeAdapterFactory
- Enclosing class:
- TreeTypeAdapter<T>
private static final class TreeTypeAdapter.SingleTypeFactory extends java.lang.Object implements TypeAdapterFactory
-
-
Field Summary
Fields Modifier and Type Field Description private JsonDeserializer<?>
deserializer
private TypeToken<?>
exactType
private java.lang.Class<?>
hierarchyType
private boolean
matchRawType
private JsonSerializer<?>
serializer
-
Constructor Summary
Constructors Constructor Description SingleTypeFactory(java.lang.Object typeAdapter, TypeToken<?> exactType, boolean matchRawType, java.lang.Class<?> hierarchyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> TypeAdapter<T>
create(Gson gson, TypeToken<T> type)
Returns a type adapter fortype
, or null if this factory doesn't supporttype
.
-
-
-
Field Detail
-
exactType
private final TypeToken<?> exactType
-
matchRawType
private final boolean matchRawType
-
hierarchyType
private final java.lang.Class<?> hierarchyType
-
serializer
private final JsonSerializer<?> serializer
-
deserializer
private final JsonDeserializer<?> deserializer
-
-
Constructor Detail
-
SingleTypeFactory
SingleTypeFactory(java.lang.Object typeAdapter, TypeToken<?> exactType, boolean matchRawType, java.lang.Class<?> hierarchyType)
-
-
Method Detail
-
create
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type)
Description copied from interface:TypeAdapterFactory
Returns a type adapter fortype
, or null if this factory doesn't supporttype
.- Specified by:
create
in interfaceTypeAdapterFactory
-
-