org.picocontainer.script.groovy
Class GroovyContainerBuilder
java.lang.Object
org.picocontainer.script.AbstractContainerBuilder
org.picocontainer.script.ScriptedContainerBuilder
org.picocontainer.script.groovy.GroovyContainerBuilder
- All Implemented Interfaces:
- ContainerBuilder
public class GroovyContainerBuilder
- extends ScriptedContainerBuilder
The groovy script has to return an instance of ClassLoadingPicoContainer
.
There is an implicit variable named "parent" that may contain a reference to a parent
container.
- Author:
- Paul Hammant, Aslak Hellesøy, Mauro Talevi
Method Summary |
protected org.picocontainer.PicoContainer |
createContainerFromScript(org.picocontainer.PicoContainer parentContainer,
Object assemblyScope)
|
protected groovy.lang.GroovyObject |
createNodeBuilder()
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroovyContainerBuilder
public GroovyContainerBuilder(Reader script,
ClassLoader classLoader)
GroovyContainerBuilder
public GroovyContainerBuilder(Reader script,
ClassLoader classLoader,
LifecycleMode lifecycleMode)
GroovyContainerBuilder
public GroovyContainerBuilder(URL script,
ClassLoader classLoader)
GroovyContainerBuilder
public GroovyContainerBuilder(URL script,
ClassLoader classLoader,
LifecycleMode lifecycleMode)
createContainerFromScript
protected org.picocontainer.PicoContainer createContainerFromScript(org.picocontainer.PicoContainer parentContainer,
Object assemblyScope)
- Specified by:
createContainerFromScript
in class ScriptedContainerBuilder
createNodeBuilder
protected groovy.lang.GroovyObject createNodeBuilder()
- 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.
- Parameters:
binding
- the binding
Copyright © 2003-2010 Codehaus. All Rights Reserved.