001 /*****************************************************************************
002 * Copyright (C) NanoContainer Organization. All rights reserved. *
003 * ------------------------------------------------------------------------- *
004 * The software in this package is published under the terms of the BSD *
005 * style license a copy of which has been included with this distribution in *
006 * the LICENSE.txt file. *
007 * *
008 *****************************************************************************/
009 package org.nanocontainer.script.xml;
010
011 import com.thoughtworks.xstream.XStream;
012 import com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider;
013
014 /**
015 * Implementation of XMLComponentInstanceFactory that uses
016 * XStream to unmarshal DOM elements in PureJava mode.
017 * In PureJava mode objects are instantiated using standard Java
018 * reflection, which is garanteed to be valid for all JVM vendors,
019 * but the types of objects that can be constructed are limited.
020 * See {@link http://xstream.codehaus.org/faq.html} for details
021 * on the differences between PureJava and Advanced mode.
022 *
023 * @author Mauro Talevi
024 */
025 public class PureJavaXStreamComponentInstanceFactory extends XStreamComponentInstanceFactory {
026 /**
027 * Creates a PureJavaXStreamComponentInstanceFactory
028 * using an instance of XStream in PureJava mode.
029 */
030 public PureJavaXStreamComponentInstanceFactory(){
031 super(new XStream(new PureJavaReflectionProvider()));
032 }
033
034 }