@Override
	protected AbstractBeanDefinition parseInternal(Element element, ParserContext parserContext) {
		BeanDefinitionBuilder builder;

		ManagedList<RuntimeBeanReference> strategies = new ManagedList<RuntimeBeanReference>();
		List<Element> sizeElements = DomUtils.getChildElementsByTagName(element, "size");

		if (sizeElements.size() == 0) {
			builder = BeanDefinitionBuilder.genericBeanDefinition(NoRolloverStrategy.class);
			return builder.getBeanDefinition();
		}

		builder = BeanDefinitionBuilder.genericBeanDefinition(ChainedRolloverStrategy.class);

		for (Element e : sizeElements) {
			BeanDefinitionBuilder nestedBuilder = BeanDefinitionBuilder.genericBeanDefinition(SizeRolloverStrategy.class);

			String sizeValue = e.getAttribute("size");
			if (StringUtils.hasText(sizeValue)) {
				nestedBuilder.addConstructorArgValue(sizeValue);
			}

			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "order");
			String nestedBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
					nestedBuilder.getBeanDefinition(),
					parserContext.getRegistry());
			strategies.add(new RuntimeBeanReference(nestedBeanName));
		}

		builder.addPropertyValue("strategies", strategies);
		return builder.getBeanDefinition();
	}
Parser for the 'rollover-policy' element.

@author Janne Valkealahti
spring-xd-hadoop/src/main/java/org/springframework/xd/integration/hadoop/config/RolloverStrategyParser.java