Class DefaultImplementationTypeAdapterFactory<S,T extends S>
java.lang.Object
org.mule.runtime.extension.internal.persistence.DefaultImplementationTypeAdapterFactory<S,T>
- All Implemented Interfaces:
com.google.gson.TypeAdapterFactory
public final class DefaultImplementationTypeAdapterFactory<S,T extends S>
extends Object
implements com.google.gson.TypeAdapterFactory
TypeAdapterFactory implementation, which creates TypeAdapters that for any subclass of DefaultImplementationTypeAdapterFactory, fixes the
serialization and deserialization to unique class DefaultImplementationTypeAdapterFactory.
Does not matter which subclass of DefaultImplementationTypeAdapterFactory is found, this factory will create TypeAdapters of DefaultImplementationTypeAdapterFactory type.
- Since:
- 1.0
-
Constructor Details
-
DefaultImplementationTypeAdapterFactory
- Parameters:
superClass- class that will be used to look for implementations of it, at serialization and deserialization timeclazz- class to fix the serialization or deserialization
-
-
Method Details
-
create
public <C> com.google.gson.TypeAdapter<C> create(com.google.gson.Gson gson, com.google.gson.reflect.TypeToken<C> type) - Specified by:
createin interfacecom.google.gson.TypeAdapterFactory- Type Parameters:
C- type of objects that theTypeAdapterwill create- Parameters:
gson- The actualGsonserializertype- Implementation thatGsonis trying to find aTypeAdapter- Returns:
- if is subclass of
superClassaTypeAdapter, that serializes and deserializeDefaultImplementationTypeAdapterFactoryinstances
-