代码拉取完成,页面将自动刷新
同步操作将从 huifer/Code-Analysis 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
类全路径: org.springframework.beans.factory.support.ManagedMap
类图:
对应标签 <map>
<property name="someMap">
<map>
<entry key="an entry" value="just some string"/>
<entry key ="a ref" value-ref="myDataSource"/>
</map>
</property>
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseMapElement
这里不做具体展开ManagedMap
作为Mergeable
的实现类, 其操作的对象为LinkedHashMap
, 想到合并可以联想到 LinkedHashMap#putAll
=> java.util.Map.putAll
Spring 中也正是如此进行操作的. 详细代码如下@Override
@SuppressWarnings("unchecked")
public Object merge(@Nullable Object parent) {
if (!this.mergeEnabled) {
throw new IllegalStateException("Not allowed to merge when the 'mergeEnabled' property is set to 'false'");
}
if (parent == null) {
return this;
}
if (!(parent instanceof Map)) {
throw new IllegalArgumentException("Cannot merge with object of type [" + parent.getClass() + "]");
}
Map<K, V> merged = new ManagedMap<>();
merged.putAll((Map<K, V>) parent);
merged.putAll(this);
return merged;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。