Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.nanocontainer.script.xml
Class XStreamContainerBuilder

    java.lang.Object
      org.nanocontainer.integrationkit.LifecycleContainerBuilder
          org.nanocontainer.script.ScriptedContainerBuilder
              org.nanocontainer.script.xml.XStreamContainerBuilder

All Implemented Interfaces:
  ContainerBuilder, ContainerPopulator

    public class XStreamContainerBuilder

extends ScriptedContainerBuilder
implements ContainerPopulator

This class builds up a hierarchy of PicoContainers from an XML configuration file.

Version:
  $Revision: 2164 $
Author:
  Konstantin Pribluda

Constructor Summary
`XStreamContainerBuilder(Reader script)` construct with just reader, use context classloader
`XStreamContainerBuilder(Reader script, ClassLoader classLoader)` construct with given script and specified classloader
`XStreamContainerBuilder(Reader script, ClassLoader classLoader, com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)`
`XStreamContainerBuilder(URL script, ClassLoader classLoader, com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)`

Method Summary
`protected org.picocontainer.PicoContainer` | `createContainerFromScript(org.picocontainer.PicoContainer parentContainer, Object assemblyScope)`
`protected void` | `insertAdapter(org.picocontainer.MutablePicoContainer container, Element rootElement)` process adapter node
`protected void` | `insertImplementation(org.picocontainer.MutablePicoContainer container, Element rootElement)` process implementation node
`protected void` | `insertInstance(org.picocontainer.MutablePicoContainer container, Element rootElement)` process instance node.
`protected Object` | `parseElementChild(Element rootElement)` parse element child with xstream and provide object
`void` | `populateContainer(org.picocontainer.MutablePicoContainer container)` Populate a container

Methods inherited from class org.nanocontainer.script.ScriptedContainerBuilder
`composeContainer, createContainer, getClassLoader, getScriptInputStream, getScriptReader`

Methods inherited from class org.nanocontainer.integrationkit.LifecycleContainerBuilder
`autoStart, buildContainer, killContainer`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### XStreamContainerBuilder

    public XStreamContainerBuilder(Reader script)

  construct with just reader, use context classloader

### XStreamContainerBuilder

    public XStreamContainerBuilder(Reader script,
                                   ClassLoader classLoader)

  construct with given script and specified classloader

### XStreamContainerBuilder

    public XStreamContainerBuilder(Reader script,
                                   ClassLoader classLoader,
                                   com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)

### XStreamContainerBuilder

    public XStreamContainerBuilder(URL script,
                                   ClassLoader classLoader,
                                   com.thoughtworks.xstream.io.HierarchicalStreamDriver driver)

Method Detail

### populateContainer

    public void populateContainer(org.picocontainer.MutablePicoContainer container)

  Description copied from interface: `ContainerPopulator`
  Populate a container

  Specified by:
    `populateContainer` in interface `ContainerPopulator`
  Parameters:
    `container` - the MutablePicoContainer to populate

### insertAdapter

    protected void insertAdapter(org.picocontainer.MutablePicoContainer container,
                                 Element rootElement)

  process adapter node

### insertImplementation

    protected void insertImplementation(org.picocontainer.MutablePicoContainer container,
                                        Element rootElement)
                                 throws ClassNotFoundException

  process implementation node

  Throws:
    `ClassNotFoundException`

### insertInstance

    protected void insertInstance(org.picocontainer.MutablePicoContainer container,
                                  Element rootElement)

  process instance node. we get key from atributes ( if any ) and leave content to xstream. we allow only one child node inside. ( first one wins )

### parseElementChild

    protected Object parseElementChild(Element rootElement)

  parse element child with xstream and provide object

### createContainerFromScript

    protected org.picocontainer.PicoContainer createContainerFromScript(org.picocontainer.PicoContainer parentContainer,
                                                                        Object assemblyScope)

  Specified by:
    `createContainerFromScript` in class `ScriptedContainerBuilder`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Codehaus. All Rights Reserved.