Code example for AbstractSingleBeanDefinitionParser

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