Code example for AbstractSingleBeanDefinitionParser

0
import java.util.Map;
 
/** 
 * @author Ryan Heaton 
 */ 
public class ProtectedResourceDetailsBeanDefinitionParser extends AbstractSingleBeanDefinitionParser {
 
  @Override 
  protected Class getBeanClass(Element element) {
    return ProtectedResourceDetailsServiceFactoryBean.class; 
  } 
 
  @Override 
  protected void doParse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) {
    List consumerElements = DomUtils.getChildElementsByTagName(element, "resource");
    for (Object item : consumerElements) {
      BeanDefinitionBuilder resource = BeanDefinitionBuilder.rootBeanDefinition(BaseProtectedResourceDetails.class);
      Element consumerElement = (Element) item;
      String id = consumerElement.getAttribute("id");
      if (StringUtils.hasText(id)) {
Contextual code suggestions in your IDE  Get Codota for Java