Coverage Report - org.mule.config.spring.parsers.specific.ComponentDefinitionParser
 
Classes in this File Line Coverage Branch Coverage Complexity
ComponentDefinitionParser
0%
0/9
N/A
1
 
 1  
 /*
 2  
  * $Id: ComponentDefinitionParser.java 11373 2008-03-15 05:03:10Z dfeist $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.config.spring.parsers.specific;
 12  
 
 13  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 14  
 import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
 15  
 
 16  
 import org.springframework.beans.factory.support.BeanDefinitionBuilder;
 17  
 import org.springframework.beans.factory.xml.ParserContext;
 18  
 import org.w3c.dom.Element;
 19  
 
 20  
 public class ComponentDefinitionParser extends ChildDefinitionParser
 21  
 {
 22  
 
 23  
     public ComponentDefinitionParser(Class clazz)
 24  
     {
 25  0
         super("component", clazz);
 26  0
         this.singleton = true;
 27  0
         addIgnored(AbstractMuleBeanDefinitionParser.ATTRIBUTE_CLASS);
 28  0
     }
 29  
 
 30  
     // @Override
 31  
     protected void parseChild(Element element, ParserContext parserContext, BeanDefinitionBuilder builder)
 32  
     {
 33  0
         Element parent = (Element) element.getParentNode();
 34  0
         String serviceName = parent.getAttribute(ATTRIBUTE_NAME);
 35  0
         builder.addPropertyReference("service", serviceName);
 36  0
         super.parseChild(element, parserContext, builder);
 37  0
     }
 38  
 }