| java.lang.Object groovy.lang.GroovyObjectSupport groovy.util.BuilderSupport
All known Subclasses: groovy.xml.MarkupBuilder, groovy.util.AntBuilder, groovy.xml.SAXBuilder, groovy.util.NodeBuilder, groovy.xml.NamespaceBuilderSupport, groovy.swing.SwingBuilder, groovy.xml.DOMBuilder,
BuilderSupport | abstract public class BuilderSupport extends GroovyObjectSupport (Code) | | An abstract base class for creating arbitrary nested trees of objects
or events
author: James Strachan version: $Revision: 4247 $ |
Method Summary | |
abstract protected Object | createNode(Object name) | abstract protected Object | createNode(Object name, Object value) | abstract protected Object | createNode(Object name, Map attributes) | abstract protected Object | createNode(Object name, Map attributes, Object value) | protected Object | doInvokeMethod(String methodName, Object name, Object args) | protected Object | getCurrent() | protected Object | getName(String methodName) | public Object | invokeMethod(String methodName) | public Object | invokeMethod(String methodName, Object args) | protected void | nodeCompleted(Object parent, Object node) | protected void | setClosureDelegate(Closure closure, Object node) A strategy method to allow derived builders to use
builder-trees and switch in different kinds of builders. | protected void | setCurrent(Object current) | abstract protected void | setParent(Object parent, Object child) |
BuilderSupport | public BuilderSupport()(Code) | | |
getName | protected Object getName(String methodName)(Code) | | A hook to allow names to be converted into some other object
such as a QName in XML or ObjectName in JMX
Parameters: methodName - |
invokeMethod | public Object invokeMethod(String methodName)(Code) | | Convenience method when no arguments are required
the result of the call Parameters: methodName - the name of the method to invoke |
nodeCompleted | protected void nodeCompleted(Object parent, Object node)(Code) | | A hook to allow nodes to be processed once they have had all of their
children applied
|
setClosureDelegate | protected void setClosureDelegate(Closure closure, Object node)(Code) | | A strategy method to allow derived builders to use
builder-trees and switch in different kinds of builders.
This method should call the setDelegate() method on the closure
which by default passes in this but if node is-a builder
we could pass that in instead (or do something wacky too)
Parameters: closure - the closure on which to call setDelegate() Parameters: node - the node value that we've just created, which could bea builder |
|
|