Coverage Report - org.mule.transformers.xml.wire.XStreamWireFormat
 
Classes in this File Line Coverage Branch Coverage Complexity
XStreamWireFormat
0%
0/14
N/A
1
 
 1  
 /*
 2  
  * $Id: XStreamWireFormat.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 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.transformers.xml.wire;
 12  
 
 13  
 import org.mule.transformers.wire.TransformerPairWireFormat;
 14  
 import org.mule.transformers.xml.ObjectToXml;
 15  
 import org.mule.transformers.xml.XStreamFactory;
 16  
 import org.mule.transformers.xml.XmlToObject;
 17  
 
 18  
 import java.util.List;
 19  
 import java.util.Map;
 20  
 
 21  
 /**
 22  
  * Serializes objects using XStream. This is equivelent of using the ObjectToXml and
 23  
  * XmlToObject except that there is not source or return type checking. WireFormats
 24  
  * are only
 25  
  */
 26  
 public class XStreamWireFormat extends TransformerPairWireFormat
 27  
 {
 28  
     public XStreamWireFormat() throws IllegalAccessException, InstantiationException, ClassNotFoundException
 29  
     {
 30  0
         this(XStreamFactory.XSTREAM_XPP_DRIVER, null, null);
 31  0
     }
 32  
 
 33  
     public XStreamWireFormat(String driverClassName, Map aliases, List converters)
 34  
         throws IllegalAccessException, InstantiationException, ClassNotFoundException
 35  0
     {
 36  0
         XmlToObject in = new XmlToObject();
 37  0
         in.setDriverClassName(driverClassName);
 38  0
         in.setAliases(aliases);
 39  0
         in.setConverters(converters);
 40  0
         setInboundTransformer(in);
 41  
 
 42  0
         ObjectToXml out = new ObjectToXml();
 43  0
         out.setDriverClassName(driverClassName);
 44  0
         out.setAliases(aliases);
 45  0
         out.setConverters(converters);
 46  0
         setOutboundTransformer(out);
 47  0
     }
 48  
 
 49  
 }