Package clarifai2.internal
Class AutoValueTypeAdapterFactory
- java.lang.Object
-
- clarifai2.internal.AutoValueTypeAdapterFactory
-
- All Implemented Interfaces:
com.google.gson.TypeAdapterFactory
public final class AutoValueTypeAdapterFactory extends java.lang.Object implements com.google.gson.TypeAdapterFactory
ATypeAdapterFactory
that attempts to delegate any serialization/deserialization of an AutoValue class to the adapter that is registered for the base class.For example, this allows use of
JsonAdapter
on the base AutoValue class. Proper serialization will still occur according to thatJsonAdapter
when the class is passed through Gson. Otherwise, Gson would always use default serialization on AutoValue classes, because technically, the generated class has no custom serializer.
-
-
Constructor Summary
Constructors Constructor Description AutoValueTypeAdapterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> com.google.gson.TypeAdapter<T>
create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<T> typeToken)
-