mirror of
https://e.coding.net/circlecloud/GsonAgent.git
synced 2024-12-25 07:18:51 +00:00
修改获取类名...
Signed-off-by: 502647092 <jtb1@163.com>
This commit is contained in:
parent
2dc3901c06
commit
64571818cc
@ -21,14 +21,14 @@ import cn.citycraft.GsonAgent.api.utils.Utils;
|
||||
* @since 2016年1月5日 下午12:51:30
|
||||
* @author 喵♂呜,曲尘
|
||||
*/
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@SuppressWarnings({ "unchecked", "rawtypes", "unused" })
|
||||
public class GsonAgent {
|
||||
public static boolean newVersion = false;
|
||||
private static String internalPackageName;
|
||||
private static Class TypeAdapter;
|
||||
|
||||
static {
|
||||
internalPackageName = "cn.citycraft.PluginHelper.gsonagent.";
|
||||
internalPackageName = "cn.citycraft.GsonAgent.";
|
||||
try {
|
||||
Thread.currentThread().getContextClassLoader().loadClass("com.google.gson.Gson");
|
||||
newVersion = true;
|
||||
@ -39,7 +39,6 @@ public class GsonAgent {
|
||||
try {
|
||||
TypeAdapter = getInternalClass("bind.TypeAdapter");
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,4 +131,14 @@ public class GsonAgent {
|
||||
private static Class<?> getInternalClass(final String className) throws ClassNotFoundException {
|
||||
return Class.forName(internalPackageName + className + "Handle");
|
||||
}
|
||||
|
||||
private void none() {
|
||||
Class clazz;
|
||||
clazz = cn.citycraft.GsonAgent.api.bind.TypeAdapter.class;
|
||||
clazz = cn.citycraft.GsonAgent.nms.bind.TypeAdapterHandle.class;
|
||||
clazz = cn.citycraft.GsonAgent.normal.bind.TypeAdapterHandle.class;
|
||||
clazz = cn.citycraft.GsonAgent.api.bind.TypeAdapterFactory.class;
|
||||
clazz = cn.citycraft.GsonAgent.nms.bind.TypeAdapterFactoryHandle.class;
|
||||
clazz = cn.citycraft.GsonAgent.normal.bind.TypeAdapterFactoryHandle.class;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user