View Javadoc

1   /*
2    * $Id: DummyConverter.java 20321 2010-11-24 15:21:24Z dfeist $
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  package org.mule.transformers.xml.xstream;
11  
12  import com.thoughtworks.xstream.converters.Converter;
13  import com.thoughtworks.xstream.converters.MarshallingContext;
14  import com.thoughtworks.xstream.converters.UnmarshallingContext;
15  import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
16  import com.thoughtworks.xstream.io.HierarchicalStreamReader;
17  
18  /**
19   * Used for configuration testing
20   */
21  public class DummyConverter implements Converter
22  {
23      public void marshal(Object source, HierarchicalStreamWriter writer, MarshallingContext context)
24      {
25          //do nothing
26      }
27  
28      public Object unmarshal(HierarchicalStreamReader reader, UnmarshallingContext context)
29      {
30          return null;
31      }
32  
33      public boolean canConvert(Class type)
34      {
35          return false;
36      }
37  }