KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > nanocontainer > script > xml > PureJavaXStreamComponentInstanceFactory


1 /*****************************************************************************
2  * Copyright (C) NanoContainer Organization. All rights reserved. *
3  * ------------------------------------------------------------------------- *
4  * The software in this package is published under the terms of the BSD *
5  * style license a copy of which has been included with this distribution in *
6  * the LICENSE.txt file. *
7  * *
8  *****************************************************************************/

9 package org.nanocontainer.script.xml;
10
11 import com.thoughtworks.xstream.XStream;
12 import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
13
14 /**
15  * Implementation of XMLComponentInstanceFactory that uses
16  * XStream to unmarshal DOM elements in PureJava mode.
17  * In PureJava mode objects are instantiated using standard Java
18  * reflection, which is garanteed to be valid for all JVM vendors,
19  * but the types of objects that can be constructed are limited.
20  * See {@link http://xstream.codehaus.org/faq.html} for details
21  * on the differences between PureJava and Advanced mode.
22  *
23  * @author Mauro Talevi
24  */

25 public class PureJavaXStreamComponentInstanceFactory extends XStreamComponentInstanceFactory {
26     /**
27      * Creates a PureJavaXStreamComponentInstanceFactory
28      * using an instance of XStream in PureJava mode.
29      */

30     public PureJavaXStreamComponentInstanceFactory(){
31         super(new XStream(new PureJavaReflectionProvider()));
32     }
33     
34 }
35
Popular Tags