Package com.pixelmonmod.api
Class SpecificationTypeAdapter<A extends Specification<B,C>,B,C>
java.lang.Object
com.pixelmonmod.api.SpecificationTypeAdapter<A,B,C>
- Type Parameters:
A
- The specification implementation typeB
- The reforged data typeC
- The minecraft type
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<A>
,com.google.gson.JsonSerializer<A>
public class SpecificationTypeAdapter<A extends Specification<B,C>,B,C>
extends Object
implements com.google.gson.JsonSerializer<A>, com.google.gson.JsonDeserializer<A>
Type adapter implementation for writing any form of
Specification
to JSON-
Constructor Summary
-
Method Summary
-
Constructor Details
-
SpecificationTypeAdapter
-
-
Method Details
-
deserialize
public A 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<A extends Specification<B,
C>> - Throws:
com.google.gson.JsonParseException
-
serialize
public com.google.gson.JsonElement serialize(A spec, Type typeOfSrc, com.google.gson.JsonSerializationContext context) - Specified by:
serialize
in interfacecom.google.gson.JsonSerializer<A extends Specification<B,
C>>
-