Factions/src/com/massivecraft/factions/adapter/RelAdapter.java
2013-04-22 09:37:53 +02:00

31 lines
938 B
Java

package com.massivecraft.factions.adapter;
import java.lang.reflect.Type;
import com.massivecraft.mcore.xlib.gson.JsonDeserializationContext;
import com.massivecraft.mcore.xlib.gson.JsonDeserializer;
import com.massivecraft.mcore.xlib.gson.JsonElement;
import com.massivecraft.mcore.xlib.gson.JsonParseException;
import com.massivecraft.factions.Rel;
public class RelAdapter implements JsonDeserializer<Rel>
{
// -------------------------------------------- //
// INSTANCE & CONSTRUCT
// -------------------------------------------- //
private static RelAdapter i = new RelAdapter();
public static RelAdapter get() { return i; }
// -------------------------------------------- //
// OVERRIDE
// -------------------------------------------- //
@Override
public Rel deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException
{
return Rel.parse(json.getAsString());
}
}