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.groovy
Class GroovyContainerBuilder

    java.lang.Object
      org.nanocontainer.integrationkit.LifecycleContainerBuilder
          org.nanocontainer.script.ScriptedContainerBuilder
              org.nanocontainer.script.groovy.GroovyContainerBuilder

All Implemented Interfaces:
  org.nanocontainer.integrationkit.ContainerBuilder

    public class GroovyContainerBuilder

extends org.nanocontainer.script.ScriptedContainerBuilder

The groovy script has to return an instance of `NanoContainer`. There is an implicit variable named "parent" that may contain a reference to a parent container. It is recommended to use this as a constructor argument to the instantiated NanoPicoContainer.

Version:
  $Revision: 3144 $
Author:
  Paul Hammant, Aslak Hellesøy, Mauro Talevi

Constructor Summary
`GroovyContainerBuilder(Reader script, ClassLoader classLoader)`
`GroovyContainerBuilder(URL script, ClassLoader classLoader)`

Method Summary
`protected org.picocontainer.PicoContainer` | `createContainerFromScript(org.picocontainer.PicoContainer parentContainer, Object assemblyScope)`
`protected groovy.lang.GroovyObject` | `createGroovyNodeBuilder()` Allows customization of the groovy node builder in descendants.
`protected void` | `handleBinding(groovy.lang.Binding binding)` This allows children of this class to add to the default binding.

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

### GroovyContainerBuilder

    public GroovyContainerBuilder(Reader script,
                                  ClassLoader classLoader)

### GroovyContainerBuilder

    public GroovyContainerBuilder(URL script,
                                  ClassLoader classLoader)

Method Detail

### createContainerFromScript

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

  Specified by:
    `createContainerFromScript` in class `org.nanocontainer.script.ScriptedContainerBuilder`

### createGroovyNodeBuilder

    protected groovy.lang.GroovyObject createGroovyNodeBuilder()

  Allows customization of the groovy node builder in descendants.

  Returns:
    GroovyNodeBuilder

### handleBinding

    protected void handleBinding(groovy.lang.Binding binding)

  This allows children of this class to add to the default binding. Might want to add similar or a more generic implementation of this method to support the other scripting languages.

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.