A
- The specification implementation typeB
- The reforged data typeC
- The minecraft typepublic class SpecificationTypeAdapter<A extends Specification<B,C>,B,C>
extends java.lang.Object
implements com.google.gson.JsonSerializer<A>, com.google.gson.JsonDeserializer<A>
Specification
to JSONConstructor and Description |
---|
SpecificationTypeAdapter(java.lang.Class<A> clazz) |
Modifier and Type | Method and Description |
---|---|
A |
deserialize(com.google.gson.JsonElement json,
java.lang.reflect.Type typeOfT,
com.google.gson.JsonDeserializationContext context) |
com.google.gson.JsonElement |
serialize(A spec,
java.lang.reflect.Type typeOfSrc,
com.google.gson.JsonSerializationContext context) |
public SpecificationTypeAdapter(java.lang.Class<A> clazz)
public A deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
deserialize
in interface com.google.gson.JsonDeserializer<A extends Specification<B,C>>
com.google.gson.JsonParseException
public com.google.gson.JsonElement serialize(A spec, java.lang.reflect.Type typeOfSrc, com.google.gson.JsonSerializationContext context)
serialize
in interface com.google.gson.JsonSerializer<A extends Specification<B,C>>