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
{@inheritDoc}
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
Method Summary |
protected org.picocontainer.PicoContainer |
createContainerFromScript(org.picocontainer.PicoContainer parentContainer,
java.lang.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 |
GroovyContainerBuilder
public GroovyContainerBuilder(java.io.Reader script,
java.lang.ClassLoader classLoader)
GroovyContainerBuilder
public GroovyContainerBuilder(java.net.URL script,
java.lang.ClassLoader classLoader)
createContainerFromScript
protected org.picocontainer.PicoContainer createContainerFromScript(org.picocontainer.PicoContainer parentContainer,
java.lang.Object assemblyScope)
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.
Copyright © 2003-2007 Codehaus. All Rights Reserved.