/** * Set the name of the parent definition of this bean definition. */ public BeanDefinitionBuilder setParentName(String parentName) { this.beanDefinition.setParentName(parentName); return this; }
/** * Set the name of the parent definition of this bean definition. */ public BeanDefinitionBuilder setParentName(String parentName) { this.beanDefinition.setParentName(parentName); return this; }
protected AbstractBeanDefinition createBeanDefinition() { AbstractBeanDefinition bd = new GenericBeanDefinition(); bd.setBeanClass(this.clazz); if (!CollectionUtils.isEmpty(this.constructorArgs)) { ConstructorArgumentValues cav = new ConstructorArgumentValues(); for (Object constructorArg : this.constructorArgs) { cav.addGenericArgumentValue(constructorArg); } bd.setConstructorArgumentValues(cav); } if (this.parentName != null) { bd.setParentName(this.parentName); } this.definitionWrapper = new BeanWrapperImpl(bd); return bd; }
public void setParent(Object obj) { if (obj == null) { throw new IllegalArgumentException("Parent bean cannot be set to a null runtime bean reference!"); } if (obj instanceof String) { this.parentName = (String) obj; } else if (obj instanceof RuntimeBeanReference) { this.parentName = ((RuntimeBeanReference) obj).getBeanName(); } else if (obj instanceof GroovyBeanDefinitionWrapper) { this.parentName = ((GroovyBeanDefinitionWrapper) obj).getBeanName(); } getBeanDefinition().setParentName(this.parentName); getBeanDefinition().setAbstract(false); }
/** * Parse the flow and turn it into a list of transitions. * * @param element the <flow/gt; element to parse * @param parserContext the parser context for the bean factory * @return a collection of bean definitions for * {@link org.springframework.batch.core.job.flow.support.StateTransition} * instances objects */ public Collection<BeanDefinition> parse(Element element, ParserContext parserContext) { String refAttribute = element.getAttribute(REF_ATTR); String idAttribute = element.getAttribute(ID_ATTR); BeanDefinitionBuilder stateBuilder = BeanDefinitionBuilder .genericBeanDefinition("org.springframework.batch.core.job.flow.support.state.FlowState"); AbstractBeanDefinition flowDefinition = new GenericBeanDefinition(); flowDefinition.setParentName(refAttribute); MutablePropertyValues propertyValues = flowDefinition.getPropertyValues(); propertyValues.addPropertyValue("name", idAttribute); stateBuilder.addConstructorArgValue(flowDefinition); stateBuilder.addConstructorArgValue(idAttribute); return InlineFlowParser.getNextElements(parserContext, stateBuilder.getBeanDefinition(), element); } }
protected AbstractBeanDefinition createBeanDefinition() { AbstractBeanDefinition bd = new GenericBeanDefinition(); bd.setBeanClass(this.clazz); if (!CollectionUtils.isEmpty(this.constructorArgs)) { ConstructorArgumentValues cav = new ConstructorArgumentValues(); for (Object constructorArg : this.constructorArgs) { cav.addGenericArgumentValue(constructorArg); } bd.setConstructorArgumentValues(cav); } if (this.parentName != null) { bd.setParentName(this.parentName); } this.definitionWrapper = new BeanWrapperImpl(bd); return bd; }
flowDefinition.setParentName(ref); MutablePropertyValues propertyValues = flowDefinition.getPropertyValues(); propertyValues.addPropertyValue("name", prefix + "." + i);
public void setParent(Object obj) { if (obj == null) { throw new IllegalArgumentException("Parent bean cannot be set to a null runtime bean reference!"); } if (obj instanceof String) { this.parentName = (String) obj; } else if (obj instanceof RuntimeBeanReference) { this.parentName = ((RuntimeBeanReference) obj).getBeanName(); } else if (obj instanceof GroovyBeanDefinitionWrapper) { this.parentName = ((GroovyBeanDefinitionWrapper) obj).getBeanName(); } getBeanDefinition().setParentName(this.parentName); getBeanDefinition().setAbstract(false); }
bd.setParentName(parentRef);
String parentName = getParentName(element); if (parentName != null) { builder.getRawBeanDefinition().setParentName(parentName);
/** * Set the name of the parent definition of this bean definition. */ public BeanDefinitionBuilder setParentName(String parentName) { this.beanDefinition.setParentName(parentName); return this; }
String parentName = getParentName(element); if (parentName != null) { builder.getRawBeanDefinition().setParentName(parentName);
setParentName(original.getParentName()); setBeanClassName(original.getBeanClassName()); setScope(original.getScope());
setParentName(original.getParentName()); setBeanClassName(original.getBeanClassName()); setScope(original.getScope());
/** * Set the name of the parent definition of this bean definition. */ public BeanDefinitionBuilder setParentName(String parentName) { this.beanDefinition.setParentName(parentName); return this; }
String parentName = getParentName(element); if (parentName != null) { builder.getRawBeanDefinition().setParentName(parentName);
/** * Parse the flow and turn it into a list of transitions. * * @param element the <flow/gt; element to parse * @param parserContext the parser context for the bean factory * @return a collection of bean definitions for * {@link org.springframework.batch.core.job.flow.support.StateTransition} * instances objects */ public Collection<BeanDefinition> parse(Element element, ParserContext parserContext) { String refAttribute = element.getAttribute(REF_ATTR); String idAttribute = element.getAttribute(ID_ATTR); BeanDefinitionBuilder stateBuilder = BeanDefinitionBuilder .genericBeanDefinition("org.springframework.batch.core.job.flow.support.state.FlowState"); AbstractBeanDefinition flowDefinition = new GenericBeanDefinition(); flowDefinition.setParentName(refAttribute); MutablePropertyValues propertyValues = flowDefinition.getPropertyValues(); propertyValues.addPropertyValue("name", idAttribute); stateBuilder.addConstructorArgValue(flowDefinition); stateBuilder.addConstructorArgValue(idAttribute); return InlineFlowParser.getNextElements(parserContext, stateBuilder.getBeanDefinition(), element); } }
setParentName(original.getParentName()); setBeanClassName(original.getBeanClassName()); setFactoryBeanName(original.getFactoryBeanName());
protected AbstractBeanDefinition createBeanDefinition() { AbstractBeanDefinition bd = new GenericBeanDefinition(); bd.setBeanClass(this.clazz); if (!CollectionUtils.isEmpty(this.constructorArgs)) { ConstructorArgumentValues cav = new ConstructorArgumentValues(); for (Object constructorArg : this.constructorArgs) { cav.addGenericArgumentValue(constructorArg); } bd.setConstructorArgumentValues(cav); } if (this.parentName != null) { bd.setParentName(this.parentName); } this.definitionWrapper = new BeanWrapperImpl(bd); return bd; }
public void setParent(Object obj) { if (obj == null) { throw new IllegalArgumentException("Parent bean cannot be set to a null runtime bean reference!"); } if (obj instanceof String) { this.parentName = (String) obj; } else if (obj instanceof RuntimeBeanReference) { this.parentName = ((RuntimeBeanReference) obj).getBeanName(); } else if (obj instanceof GroovyBeanDefinitionWrapper) { this.parentName = ((GroovyBeanDefinitionWrapper) obj).getBeanName(); } getBeanDefinition().setParentName(this.parentName); getBeanDefinition().setAbstract(false); }