Code example for AbstractSingleBeanDefinitionParser

0
 * Parse <step-listener/> elements in the batch namespace. 
 *  
 * @author Dan Garrette 
 * @since 2.0 
 */ 
public class TopLevelStepListenerParser extends AbstractSingleBeanDefinitionParser { 
 
	private static final StepListenerParser stepListenerParser = new StepListenerParser(); 
 
	@Override 
	protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) { 
		CoreNamespaceUtils.autoregisterBeansForNamespace(parserContext, element); 
		stepListenerParser.doParse(element, parserContext, builder); 
	} 
 
	@Override 
	protected Class<? extends AbstractListenerFactoryBean<?>> getBeanClass(Element element) { 
		return stepListenerParser.getBeanClass(); 
	}