setting元素的判断
对于setting元素会先进行判读,是否有非法的值
private Properties settingsAsProperties(XNode context) {
if (context == null) {
return new Properties();
}
//得到配置文件setting节点下的所有属性
Properties props = context.getChildrenAsProperties();
// 通过反射工具得到Configuration对象
MetaClass metaConfig = MetaClass.forClass(Configuration.class, localReflectorFactory);
//如果setting节点下的属性有Configuration对象未包含的属性则报错
for (Object key : props.keySet()) {
if (!metaConfig.hasSetter(String.valueOf(key))) {
throw new BuilderException("The setting " + key + " is not known. Make sure you spelled it correctly (case sensitive).");
}
}
return props;
}
加载Vfs
对于完成判断的setting元素会先对vfs进行复制