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

		ManagedList<RuntimeBeanReference> strategies = new ManagedList<RuntimeBeanReference>();
		List<Element> staticElements = DomUtils.getChildElementsByTagName(element, "static");
		List<Element> rollingElements = DomUtils.getChildElementsByTagName(element, "rolling");
		List<Element> codecElements = DomUtils.getChildElementsByTagName(element, "codec");
		List<Element> uuidElements = DomUtils.getChildElementsByTagName(element, "uuid");

		if (staticElements.size() == 0 && rollingElements.size() == 0 && codecElements.size() == 0
				&& uuidElements.size() == 0) {
			builder = BeanDefinitionBuilder.genericBeanDefinition(StaticFileNamingStrategy.class);
			return builder.getBeanDefinition();
		}

		builder = BeanDefinitionBuilder.genericBeanDefinition(ChainedFileNamingStrategy.class);

		for (Element e : staticElements) {
			BeanDefinitionBuilder nestedBuilder = BeanDefinitionBuilder.genericBeanDefinition(StaticFileNamingStrategy.class);
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "order");
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "name");
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "prefix");
			String nestedBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
					nestedBuilder.getBeanDefinition(),
					parserContext.getRegistry());
			strategies.add(new RuntimeBeanReference(nestedBeanName));
		}

		for (Element e : rollingElements) {
			BeanDefinitionBuilder nestedBuilder = BeanDefinitionBuilder.genericBeanDefinition(RollingFileNamingStrategy.class);
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "order");
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "prefix");
			String nestedBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
					nestedBuilder.getBeanDefinition(),
					parserContext.getRegistry());
			strategies.add(new RuntimeBeanReference(nestedBeanName));
		}

		for (Element e : codecElements) {
			BeanDefinitionBuilder nestedBuilder = BeanDefinitionBuilder.genericBeanDefinition(CodecFileNamingStrategy.class);
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "order");
			String nestedBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
					nestedBuilder.getBeanDefinition(),
					parserContext.getRegistry());
			strategies.add(new RuntimeBeanReference(nestedBeanName));
		}

		for (Element e : uuidElements) {
			BeanDefinitionBuilder nestedBuilder = BeanDefinitionBuilder.genericBeanDefinition(UuidFileNamingStrategy.class);
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "order");
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "enabled");
			IntegrationNamespaceUtils.setValueIfAttributeDefined(nestedBuilder, e, "uuid");
			String nestedBeanName = BeanDefinitionReaderUtils.registerWithGeneratedName(
					nestedBuilder.getBeanDefinition(),
					parserContext.getRegistry());
			strategies.add(new RuntimeBeanReference(nestedBeanName));
		}

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

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