Package com.uber.cadence.converter
Class TEnumTypeAdapterFactory
- java.lang.Object
-
- com.uber.cadence.converter.TEnumTypeAdapterFactory
-
- All Implemented Interfaces:
com.google.gson.TypeAdapterFactory
public class TEnumTypeAdapterFactory extends java.lang.Object implements com.google.gson.TypeAdapterFactory
Special handling of TEnum serialization and deserialization. This is to support for inline TEnum fields in Java class. The default gson serde serialize the TEnum with its String name representation, this adapter serialize the TEnum class with its int representation.
-
-
Constructor Summary
Constructors Constructor Description TEnumTypeAdapterFactory()
-
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)
-