Class ImmutableBattleStatsTypeAdapter

java.lang.Object
com.pixelmonmod.pixelmon.api.pokemon.species.typeadapters.ImmutableBattleStatsTypeAdapter
All Implemented Interfaces:
com.google.gson.JsonDeserializer<ImmutableBattleStats>, com.google.gson.JsonSerializer<ImmutableBattleStats>

public class ImmutableBattleStatsTypeAdapter extends Object implements com.google.gson.JsonSerializer<ImmutableBattleStats>, com.google.gson.JsonDeserializer<ImmutableBattleStats>
Gson type TypeAdapter for the ImmutableBattleStats class such that it can be converted to and from Json text when loading to/from Species data.
  • Constructor Details

    • ImmutableBattleStatsTypeAdapter

      public ImmutableBattleStatsTypeAdapter()
  • Method Details

    • deserialize

      public ImmutableBattleStats deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
      Specified by:
      deserialize in interface com.google.gson.JsonDeserializer<ImmutableBattleStats>
      Throws:
      com.google.gson.JsonParseException
    • serialize

      public com.google.gson.JsonElement serialize(ImmutableBattleStats src, Type typeOfSrc, com.google.gson.JsonSerializationContext context)
      Specified by:
      serialize in interface com.google.gson.JsonSerializer<ImmutableBattleStats>