1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-24 02:08:48 +00:00

fix: 去除配置类的错误导入

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-11-16 18:19:16 +08:00
parent ebd764ac57
commit 877ef5e0b5

View File

@ -1,23 +1,20 @@
package pw.yumc.YumCore.config.inject; package pw.yumc.YumCore.config.inject;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashMap;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import pw.yumc.YumCore.bukkit.Log; import pw.yumc.YumCore.bukkit.Log;
import pw.yumc.YumCore.commands.exception.CommandParseException;
import pw.yumc.YumCore.config.annotation.ConfigNode; import pw.yumc.YumCore.config.annotation.ConfigNode;
import pw.yumc.YumCore.config.annotation.Default; import pw.yumc.YumCore.config.annotation.Default;
import pw.yumc.YumCore.config.annotation.Nullable; import pw.yumc.YumCore.config.annotation.Nullable;
import pw.yumc.YumCore.config.annotation.ReadOnly; import pw.yumc.YumCore.config.annotation.ReadOnly;
import pw.yumc.YumCore.config.exception.ConfigParseException; import pw.yumc.YumCore.config.exception.ConfigParseException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Modifier;
import java.util.ArrayList;
import java.util.HashMap;
/** /**
* 抽象注入配置 * 抽象注入配置
* *
@ -61,7 +58,6 @@ public abstract class AbstractInjectConfig {
* @param value * @param value
* 字段值 * 字段值
* @return 转换后的值 * @return 转换后的值
* @throws ParseException
* @throws IllegalAccessException * @throws IllegalAccessException
* @throws IllegalArgumentException * @throws IllegalArgumentException
* @throws InstantiationException * @throws InstantiationException
@ -69,7 +65,7 @@ public abstract class AbstractInjectConfig {
* @throws NoSuchMethodException * @throws NoSuchMethodException
* @throws SecurityException * @throws SecurityException
*/ */
private Object convertType(Class<?> type, String path, Object value) throws CommandParseException, IllegalAccessException, IllegalArgumentException, InstantiationException, InvocationTargetException, NoSuchMethodException, SecurityException { private Object convertType(Class<?> type, String path, Object value) throws IllegalAccessException, IllegalArgumentException, InstantiationException, InvocationTargetException, NoSuchMethodException, SecurityException {
Object result = InjectParse.parse(type, config, path); Object result = InjectParse.parse(type, config, path);
return result == null ? hanldeDefault(type, path, value) : result; return result == null ? hanldeDefault(type, path, value) : result;
} }
@ -108,7 +104,7 @@ public abstract class AbstractInjectConfig {
* 字段 * 字段
* @param value * @param value
* *
* @throws ParseException * @throws java.text.ParseException
* @throws SecurityException * @throws SecurityException
* @throws NoSuchMethodException * @throws NoSuchMethodException
* @throws InvocationTargetException * @throws InvocationTargetException