return bds != null && bds.size() > 0;
}
private BeanDefinitionRegistry createRegistry(IBeansConfig config, IResourceModelElement contextElement,
boolean fillCompletely) {
DefaultBeanDefinitionRegistry registry = new DefaultBeanDefinitionRegistry();
if (contextElement instanceof BeansConfigSet) {
IBeansConfigSet configSet = (IBeansConfigSet) contextElement;
if (fillCompletely) {
registry.setAllowAliasOverriding(true);
registry.setAllowBeanDefinitionOverriding(true);
}
else {
registry.setAllowAliasOverriding(configSet.isAllowAliasOverriding());
registry.setAllowBeanDefinitionOverriding(configSet.isAllowBeanDefinitionOverriding());
}
for (IBeansConfig csConfig : configSet.getConfigs()) {
if (!fillCompletely && config.equals(csConfig)) {
break;
}
BeansModelUtils.register(configSet, csConfig, registry);
}
}
else if (contextElement instanceof IBeansConfig && !config.equals(contextElement)) {
registry.setAllowAliasOverriding(true);
registry.setAllowBeanDefinitionOverriding(true);
if (fillCompletely) {
BeansModelUtils.register(null, (IBeansConfig) contextElement, registry);
}
}
else {
registry.setAllowAliasOverriding(false);
registry.setAllowBeanDefinitionOverriding(false);
if (fillCompletely) {
BeansModelUtils.register(null, config, registry);
}
}
return registry;