1
0
mirror of https://e.coding.net/circlecloud/YumCore.git synced 2024-11-22 01:48:50 +00:00

feat: 重命名NotSave为ReadOnly

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2016-10-26 17:04:15 +08:00
parent 5bb985e9eb
commit 7a12e0ce9b
2 changed files with 21 additions and 21 deletions

View File

@ -7,7 +7,7 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 忽略配置保存
* 只读配置
*
* @author
* @since 2016年10月24日 上午00:11
@ -15,5 +15,5 @@ import java.lang.annotation.Target;
@Target(ElementType.FIELD)
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface NotSave {
public @interface ReadOnly {
}

View File

@ -14,8 +14,8 @@ 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.Default;
import pw.yumc.YumCore.config.annotation.NotSave;
import pw.yumc.YumCore.config.annotation.Nullable;
import pw.yumc.YumCore.config.annotation.ReadOnly;
import pw.yumc.YumCore.config.exception.ConfigParseException;
/**
@ -192,7 +192,7 @@ public abstract class AbstractInjectConfig {
*/
protected void setConfig(String path, Field field) {
try {
if (field.getAnnotation(NotSave.class) == null) {
if (field.getAnnotation(ReadOnly.class) == null) {
config.set(path, field.get(this));
}
} catch (IllegalArgumentException | IllegalAccessException e) {