View Javadoc
1   /*
2    * Created on Nov 22, 2004
3    *
4    * This program is free software; you can redistribute it and/or
5    * modify it under the terms of the GNU General Public License
6    * as published by the Free Software Foundation; either version 2
7    * of the License, or (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   * 
14   * Full GNU GPL license terms : http://www.fsf.org/licenses/gpl.txt
15   * 
16   * Author : mchaplin@users.sourceforge.net
17   */
18  package net.mchaplin.ioc.xml;
19  
20  import net.mchaplin.ioc.model.Component;
21  
22  import com.thoughtworks.xstream.converters.Converter;
23  import com.thoughtworks.xstream.converters.MarshallingContext;
24  import com.thoughtworks.xstream.converters.UnmarshallingContext;
25  import com.thoughtworks.xstream.io.HierarchicalStreamReader;
26  import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
27  
28  /***
29   * @author mchaplin@users.sourceforge.net
30   * 
31   * $Header: 
32   * $Revision: 
33   * $Date: 
34   */
35  public class NameConverter implements Converter {
36  
37      /***
38       * @see com.thoughtworks.xstream.converters.Converter#canConvert(java.lang.Class)
39       */
40      public boolean canConvert(Class type) {
41          return Component.class == type;
42      }
43      /***
44       * @see com.thoughtworks.xstream.converters.Converter#marshal(java.lang.Object, com.thoughtworks.xstream.io.HierarchicalStreamWriter, com.thoughtworks.xstream.converters.MarshallingContext)
45       */
46      public void marshal(Object arg0, HierarchicalStreamWriter arg1, MarshallingContext arg2) {
47          // TODO Implement NameConverter.marshal
48  
49      }
50      /***
51       * @see com.thoughtworks.xstream.converters.Converter#unmarshal(com.thoughtworks.xstream.io.HierarchicalStreamReader, com.thoughtworks.xstream.converters.UnmarshallingContext)
52       */
53      public Object unmarshal(HierarchicalStreamReader arg0, UnmarshallingContext arg1) {
54          // TODO Implement NameConverter.unmarshal
55          return null;
56      }
57  }