Olof Larsson e43f63cf59 Rename
2014-06-04 14:02:23 +02:00

30 lines
977 B
Java

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