feat: 自动初始化调试输出

Signed-off-by: 502647092 <admin@yumc.pw>
merge/1/MERGE
502647092 2016-12-25 21:13:56 +08:00
parent fbe19de5db
commit b307dcbb62
1 changed files with 2 additions and 5 deletions

View File

@ -33,12 +33,12 @@ public class P {
field.setAccessible(true);
instance = (JavaPlugin) field.get(pluginClassLoader);
} catch (Exception e) {
e.printStackTrace();
Log.d(e);
}
try {
getInjectConfigMethod = instance.getClass().getMethod("get" + instance.getName() + "Config");
} catch (NoSuchMethodException e) {
e.printStackTrace();
Log.d(e);
}
}
@ -57,7 +57,6 @@ public class P {
*
* @return
*/
@SuppressWarnings("unchecked")
public static <FC> FC getConfig() {
return (FC) instance.getConfig();
}
@ -67,7 +66,6 @@ public class P {
*
* @return
*/
@SuppressWarnings("unchecked")
public static <FC> FC getInjectConfig() {
try {
return (FC) getInjectConfigMethod.invoke(instance);
@ -109,7 +107,6 @@ public class P {
*
* @return
*/
@SuppressWarnings("unchecked")
public static <PI> PI getPlugin() {
return (PI) instance;
}