Class AdapterKamiX<T>
java.lang.Object
com.kamikazejam.kamicommon.util.adapter.AdapterKamiX<T>
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<T>, com.google.gson.JsonSerializer<T>
- Direct Known Subclasses:
AdapterKamiList, AdapterKamiMap, AdapterKamiSet, AdapterKamiTreeSet
public abstract class AdapterKamiX<T>
extends Object
implements com.google.gson.JsonDeserializer<T>, com.google.gson.JsonSerializer<T>
This is the abstract adapter for all "KamiCommon structures".
It makes sure Def instances "handle empty as null".
It makes sure we avoid infinite GSON recurse loops by recursing with supertype.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Tcreate(Object parent, com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext context) static Class<?> getClazz(@NotNull ParameterizedType pType) static @NotNull ObjectgetNewArgumentInstance(@NotNull Type type, int index) static @NotNull ParameterizedTypegetSuperType(@NotNull ParameterizedType pType) static booleancom.google.gson.JsonElement
-
Constructor Details
-
AdapterKamiX
public AdapterKamiX()
-
-
Method Details
-
serialize
-
deserialize
-
create
-
getClazz
-
getSuperType
@NotNull public static @NotNull ParameterizedType getSuperType(@NotNull @NotNull ParameterizedType pType) -
getNewArgumentInstance
-
isEmpty
-