org.nanocontainer.script.xml
Class XStreamComponentInstanceFactory

java.lang.Object
  extended byorg.nanocontainer.script.xml.XStreamComponentInstanceFactory
All Implemented Interfaces:
XMLComponentInstanceFactory
Direct Known Subclasses:
PureJavaXStreamComponentInstanceFactory

public class XStreamComponentInstanceFactory
extends java.lang.Object
implements XMLComponentInstanceFactory

Implementation of XMLComponentInstanceFactory that uses XStream to unmarshal DOM elements.

Author:
Paul Hammant, Marcos Tarruella, Mauro Talevi

Constructor Summary
XStreamComponentInstanceFactory()
          Creates an XStreamComponentInstanceFactory with the default instance of XStream
XStreamComponentInstanceFactory(com.thoughtworks.xstream.XStream xstream)
          Creates an XStreamComponentInstanceFactory for a given instance of XStream
 
Method Summary
 java.lang.Object makeInstance(org.picocontainer.PicoContainer pico, org.w3c.dom.Element element, java.lang.ClassLoader classLoader)
          Creates an instance of an Object from a DOM Element
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XStreamComponentInstanceFactory

public XStreamComponentInstanceFactory()
Creates an XStreamComponentInstanceFactory with the default instance of XStream


XStreamComponentInstanceFactory

public XStreamComponentInstanceFactory(com.thoughtworks.xstream.XStream xstream)
Creates an XStreamComponentInstanceFactory for a given instance of XStream

Parameters:
xstream - the XStream instance
Method Detail

makeInstance

public java.lang.Object makeInstance(org.picocontainer.PicoContainer pico,
                                     org.w3c.dom.Element element,
                                     java.lang.ClassLoader classLoader)
                              throws java.lang.ClassNotFoundException
Creates an instance of an Object from a DOM Element

Specified by:
makeInstance in interface XMLComponentInstanceFactory
Parameters:
pico -
element - the DOM Element
classLoader -
Returns:
An Object instance
Throws:
java.lang.ClassNotFoundException
See Also:
XMLComponentInstanceFactory.makeInstance(org.picocontainer.PicoContainer,org.w3c.dom.Element,ClassLoader)


Copyright © 2003-2007 Codehaus. All Rights Reserved.