use of cn.taketoday.context.properties.source.IterableConfigurationPropertySource in project today-framework by TAKETODAY.
the class IndexedElementsBinder method getKnownIndexedChildren.
private MultiValueMap<String, ConfigurationPropertyName> getKnownIndexedChildren(ConfigurationPropertySource source, ConfigurationPropertyName root) {
MultiValueMap<String, ConfigurationPropertyName> children = MultiValueMap.fromLinkedHashMap();
if (!(source instanceof IterableConfigurationPropertySource)) {
return children;
}
for (ConfigurationPropertyName name : (IterableConfigurationPropertySource) source.filter(root::isAncestorOf)) {
ConfigurationPropertyName choppedName = name.chop(root.getNumberOfElements() + 1);
if (choppedName.isLastElementIndexed()) {
String key = choppedName.getLastElement(Form.UNIFORM);
children.add(key, name);
}
}
return children;
}
use of cn.taketoday.context.properties.source.IterableConfigurationPropertySource in project today-infrastructure by TAKETODAY.
the class IndexedElementsBinder method getKnownIndexedChildren.
private MultiValueMap<String, ConfigurationPropertyName> getKnownIndexedChildren(ConfigurationPropertySource source, ConfigurationPropertyName root) {
MultiValueMap<String, ConfigurationPropertyName> children = MultiValueMap.fromLinkedHashMap();
if (!(source instanceof IterableConfigurationPropertySource)) {
return children;
}
for (ConfigurationPropertyName name : (IterableConfigurationPropertySource) source.filter(root::isAncestorOf)) {
ConfigurationPropertyName choppedName = name.chop(root.getNumberOfElements() + 1);
if (choppedName.isLastElementIndexed()) {
String key = choppedName.getLastElement(Form.UNIFORM);
children.add(key, name);
}
}
return children;
}
Aggregations