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

feat: 忽略合成字段

Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
502647092 2017-03-10 20:33:34 +08:00
parent 112993c217
commit 837cf64f48

View File

@ -114,7 +114,7 @@ public abstract class AbstractInjectConfig {
this.config = config;
for (Field field : getClass().getDeclaredFields()) {
// 忽略瞬态字段 忽略基础字段 忽略内联字段
if (Modifier.isTransient(field.getModifiers()) || field.getType().isPrimitive() || field.getName().startsWith("this$")) {
if (Modifier.isTransient(field.getModifiers()) || field.getType().isPrimitive() || field.getType().isSynthetic()) {
continue;
}
ConfigNode node = field.getAnnotation(ConfigNode.class);