Coverage Report - org.mule.config.spring.parsers.processors.ExtendTarget
 
Classes in this File Line Coverage Branch Coverage Complexity
ExtendTarget
0%
0/8
N/A
1
 
 1  
 /*
 2  
  * Copyright (c) MuleSoft, Inc.  All rights reserved.  http://www.mulesoft.com
 3  
  * The software in this package is published under the terms of the CPAL v1.0
 4  
  * license, a copy of which has been included with this distribution in the
 5  
  * LICENSE.txt file.
 6  
  */
 7  
 package org.mule.config.spring.parsers.processors;
 8  
 
 9  
 import org.mule.config.spring.parsers.PostProcessor;
 10  
 import org.mule.config.spring.parsers.assembly.BeanAssembler;
 11  
 
 12  
 import org.w3c.dom.Attr;
 13  
 import org.w3c.dom.Element;
 14  
 import org.springframework.beans.factory.xml.ParserContext;
 15  
 
 16  
 public class ExtendTarget implements PostProcessor
 17  
 {
 18  
 
 19  
     private String name;
 20  
     private String value;
 21  
 
 22  
     public ExtendTarget(String name, String value)
 23  0
     {
 24  0
         this.name = name;
 25  0
         this.value = value;
 26  0
     }
 27  
 
 28  
     public void postProcess(ParserContext unused, BeanAssembler assembler, Element element)
 29  
     {
 30  0
         Attr attribute = element.getOwnerDocument().createAttribute(name);
 31  0
         attribute.setNodeValue(value);
 32  0
         assembler.extendTarget(attribute);
 33  0
     }
 34  
 
 35  
 }