public final class RestrictiveTypeAdapterFactory<S,I extends S> extends Object implements com.google.gson.TypeAdapterFactory
TypeAdapterFactory implementation, which creates TypeAdapters that only for a class of type S,
fixes the serialization and deserialization to a unique class I.| Constructor and Description |
|---|
RestrictiveTypeAdapterFactory(Class<S> specificClass,
Class<I> clazz) |
| Modifier and Type | Method and Description |
|---|---|
<T> com.google.gson.TypeAdapter<T> |
create(com.google.gson.Gson gson,
com.google.gson.reflect.TypeToken<T> type) |
public <T> com.google.gson.TypeAdapter<T> create(com.google.gson.Gson gson,
com.google.gson.reflect.TypeToken<T> type)
create in interface com.google.gson.TypeAdapterFactoryT - type of objects that the TypeAdapter will creategson - The actual Gson serializertype - Implementation that GSON is trying to find a TypeAdapterclazz a TypeAdapter, that serializes and deserialize
T instancesCopyright © 2017 MuleSoft, Inc.. All rights reserved.