Class ResourceWithFallbackTypeAdapter
java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.typeadapters.ResourceWithFallbackTypeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<ResourceWithFallback>
,com.google.gson.JsonSerializer<ResourceWithFallback>
public class ResourceWithFallbackTypeAdapter
extends Object
implements com.google.gson.JsonSerializer<ResourceWithFallback>, com.google.gson.JsonDeserializer<ResourceWithFallback>
Gson
type TypeAdapter
for the ResourceWithFallback
class such that it can be converted
to and from Json text when loading to/from Species
data.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) com.google.gson.JsonElement
serialize
(ResourceWithFallback src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
-
Constructor Details
-
ResourceWithFallbackTypeAdapter
public ResourceWithFallbackTypeAdapter()
-
-
Method Details
-
deserialize
public ResourceWithFallback deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException - Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<ResourceWithFallback>
- Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(ResourceWithFallback src, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<ResourceWithFallback>
-