Class OnlyOneFieldTypeAdapterFactory

  • All Implemented Interfaces:
    com.google.gson.TypeAdapterFactory

    public final class OnlyOneFieldTypeAdapterFactory
    extends Object
    implements com.google.gson.TypeAdapterFactory
    TypeAdapterFactory implementation which creates instances of OnlyOneFieldTypeAdapter when a new object is required to be serialized and that type is a registered TypeAnnotation.
    Since:
    1.0
    • Method Detail

      • create

        public <T> com.google.gson.TypeAdapter<T> create​(com.google.gson.Gson gson,
                                                         com.google.gson.reflect.TypeToken<T> type)
        Specified by:
        create in interface com.google.gson.TypeAdapterFactory