Code example for AbstractSingleBeanDefinitionParser

0
 * Parser for the <spel-function> element. 
 * 
 * @author Artem Bilan 
 * @since 3.0 
 */ 
public class SpelFunctionParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected Class<?> getBeanClass(Element element) {
		return SpelFunctionFactoryBean.class; 
	} 
 
	@Override 
	protected void doParse(Element element, BeanDefinitionBuilder builder) {
		builder.addConstructorArgValue(element.getAttribute("class"))
				.addConstructorArgValue(element.getAttribute("method"));
 
	} 
}