Coverage Report - org.mule.config.spring.parsers.processors.ProvideDefaultNameFromElement
 
Classes in this File Line Coverage Branch Coverage Complexity
ProvideDefaultNameFromElement
0%
0/4
0%
0/2
2
 
 1  
 /*
 2  
  * $Id: ProvideDefaultNameFromElement.java 19191 2010-08-25 21:05:23Z tcarlson $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.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.processors;
 12  
 
 13  
 import org.mule.config.spring.parsers.AbstractMuleBeanDefinitionParser;
 14  
 import org.mule.config.spring.parsers.PreProcessor;
 15  
 import org.mule.config.spring.parsers.assembly.configuration.PropertyConfiguration;
 16  
 import org.mule.config.spring.parsers.generic.AutoIdUtils;
 17  
 
 18  
 import org.w3c.dom.Element;
 19  
 
 20  0
 public class ProvideDefaultNameFromElement implements PreProcessor
 21  
 {
 22  
 
 23  
     public void preProcess(PropertyConfiguration config, Element element)
 24  
     {
 25  0
         if (AutoIdUtils.blankAttribute(element, AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME))
 26  
         {
 27  0
             element.setAttribute(AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME, element.getLocalName());
 28  
         }
 29  0
     }
 30  
 
 31  
 }