class FlowElementParser {

	private static final String ID_ATTR = "id";

	private static final String REF_ATTR = "parent";

	/**
	 * Parse the flow and turn it into a list of transitions.
	 * @param element The &lt;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) {<FILL_FUNCTION_BODY>}

}


		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);

	
<no_super_class>