Remove deob.gson which isn't used

This commit is contained in:
Adam
2016-04-01 22:40:55 -04:00
parent ce9359a1fd
commit 41b3777b24
6 changed files with 0 additions and 112 deletions

View File

@@ -6,7 +6,6 @@ import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import net.runelite.deob.gson.GsonFactory;
import net.runelite.asm.pool.Field;
public class Encryption
@@ -32,15 +31,4 @@ public class Encryption
{
return fields.get(field);
}
public void save(File file) throws IOException
{
Gson g = GsonFactory.gson;
String str = g.toJson(fields);
try (FileWriter fw = new FileWriter(file))
{
fw.write(str);
}
}
}

View File

@@ -1,20 +0,0 @@
package net.runelite.deob.gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import net.runelite.asm.pool.Class;
public class ClassSerializer implements JsonSerializer<Class>
{
@Override
public JsonElement serialize(Class src, Type typeOfSrc, JsonSerializationContext context)
{
JsonObject object = new JsonObject();
object.addProperty("name", src.getName());
return object;
}
}

View File

@@ -1,22 +0,0 @@
package net.runelite.deob.gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import net.runelite.asm.pool.Field;
public class FieldSerializer implements JsonSerializer<Field>
{
@Override
public JsonElement serialize(Field src, Type typeOfSrc, JsonSerializationContext context)
{
JsonObject object = new JsonObject();
object.addProperty("class", src.getClassEntry().getName());
object.addProperty("name", src.getNameAndType().getName());
object.add("type", context.serialize(src.getNameAndType().getDescriptorType()));
return object;
}
}

View File

@@ -1,18 +0,0 @@
package net.runelite.deob.gson;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import net.runelite.asm.pool.Field;
import net.runelite.asm.pool.Method;
import net.runelite.asm.pool.Class;
public class GsonFactory
{
public static final Gson gson = new GsonBuilder()
.registerTypeAdapter(Field.class, new FieldSerializer())
.registerTypeAdapter(Method.class, new MethodSerializer())
.registerTypeAdapter(Class.class, new ClassSerializer())
.enableComplexMapKeySerialization()
.setPrettyPrinting()
.create();
}

View File

@@ -1,23 +0,0 @@
package net.runelite.deob.gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import java.lang.reflect.Type;
import net.runelite.asm.pool.Method;
public class MethodSerializer implements JsonSerializer<Method>
{
@Override
public JsonElement serialize(Method src, Type typeOfSrc, JsonSerializationContext context)
{
JsonObject object = new JsonObject();
object.addProperty("class", src.getClassEntry().getName());
object.addProperty("name", src.getNameAndType().getName());
object.add("type", context.serialize(src.getNameAndType().getDescriptor()));
return object;
}
}

View File

@@ -1,13 +1,7 @@
package net.runelite.deob.util;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import net.runelite.deob.gson.GsonFactory;
import net.runelite.asm.pool.Class;
import net.runelite.asm.pool.Field;
import net.runelite.asm.pool.Method;
@@ -40,15 +34,4 @@ public class NameMappings
{
return map;
}
public void save(File file) throws IOException
{
Gson g = GsonFactory.gson;
String str = g.toJson(map);
try (FileWriter fw = new FileWriter(file))
{
fw.write(str);
}
}
}