Code example for AbstractSingleBeanDefinitionParser

0
 * Parser for a top-level <selector/> element. 
 * 
 * @author Mark Fisher 
 * @since 1.0.4 
 */ 
public class SelectorParser extends AbstractSingleBeanDefinitionParser {
 
	@Override 
	protected String getBeanClassName(Element element) {
		return MethodInvokingSelector.class.getName();
	} 
 
	public void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
		String id = element.getAttribute("id");
		if (!StringUtils.hasText(id)) {
			parserContext.getReaderContext().error(
					"The 'id' attribute is required for a selector.", element);
		} 
		String ref = element.getAttribute("ref");
		if (!StringUtils.hasText(ref)) {
Contextual code suggestions in your IDE  Get Codota for Java