builder.setParentName(parentRef);
private void handleParentAttribute(Element element, BeanDefinitionBuilder builder) { final String parentAttribute = element.getAttribute(PARENT_ATTRIBUTE); if (StringUtils.isNotBlank(parentAttribute)) { builder.setParentName(parentAttribute); } element.removeAttribute(PARENT_ATTRIBUTE); }
/** * Populates the bean definition constructor argument with a reference to a bean with parent id equal to the * attribute if it is defined in the given element. * * @param builder the bean definition builder to be configured * @param element the XML element where the attribute should be defined * @param attributeName the name of the attribute whose value will be used to set the reference * * @return true if defined. */ public static boolean addConstructorArgParentRefIfAttributeDefined(BeanDefinitionBuilder builder, Element element, String attributeName) { String value = element.getAttribute(attributeName); if (StringUtils.hasText(value)) { BeanDefinitionBuilder child = BeanDefinitionBuilder.genericBeanDefinition(); child.setParentName(value); builder.addConstructorArgValue(child.getBeanDefinition()); return true; } return false; }
/** * Populates the bean definition constructor argument with a reference to a bean with parent id equal to the * attribute if it is defined in the given element. * * @param builder the bean definition builder to be configured * @param element the XML element where the attribute should be defined * @param attributeName the name of the attribute whose value will be used to set the reference * * @return true if defined. */ public static boolean addConstructorArgParentRefIfAttributeDefined(BeanDefinitionBuilder builder, Element element, String attributeName) { String value = element.getAttribute(attributeName); if (StringUtils.hasText(value)) { BeanDefinitionBuilder child = BeanDefinitionBuilder.genericBeanDefinition(); child.setParentName(value); builder.addConstructorArgValue(child.getBeanDefinition()); return true; } return false; }
builder.setParentName(element.getAttributes().getNamedItem("parent").getTextContent());
builder.setParentName(parentRef);
builder.setParentName(parentRef);
String parentBeanRef = element.getAttribute("parent-bean-ref").trim(); if (parentBeanRef.length() != 0) { beanBuilder.setParentName(parentBeanRef);
builder.setParentName(parentRef);
builder.setParentName(parentRef);
beanBuilder.setScope("prototype"); if(contextConfig.getDefaultStateParentBeanName() != null) { beanBuilder.setParentName(contextConfig.getDefaultStateParentBeanName());
beanBuilder.setParentName(stateConfig.getParentBeanName());