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