Class EffectTypeAdapter
java.lang.Object
com.pixelmonmod.pixelmon.battles.attacks.EffectTypeAdapter
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<EffectBase>
,com.google.gson.JsonSerializer<EffectBase>
public class EffectTypeAdapter
extends Object
implements com.google.gson.JsonSerializer<EffectBase>, com.google.gson.JsonDeserializer<EffectBase>
-
Field Summary
Modifier and TypeFieldDescriptionstatic final EffectTypeAdapter
static final HashMap<String,
Class<? extends EffectBase>> -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext ctx) com.google.gson.JsonElement
serialize
(EffectBase effect, Type type, com.google.gson.JsonSerializationContext ctx)
-
Field Details
-
ADAPTER
-
EFFECTS
-
-
Constructor Details
-
EffectTypeAdapter
public EffectTypeAdapter()
-
-
Method Details
-
serialize
public com.google.gson.JsonElement serialize(EffectBase effect, Type type, com.google.gson.JsonSerializationContext ctx) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<EffectBase>
-
deserialize
public EffectBase deserialize(com.google.gson.JsonElement json, Type type, com.google.gson.JsonDeserializationContext ctx) throws com.google.gson.JsonParseException - Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<EffectBase>
- Throws:
com.google.gson.JsonParseException
-