public abstract class BuilderSupport extends GroovyObjectSupport
Constructor and Description |
---|
BuilderSupport() |
BuilderSupport(BuilderSupport proxyBuilder) |
BuilderSupport(Closure nameMappingClosure,
BuilderSupport proxyBuilder) |
Modifier and Type | Method and Description |
---|---|
protected abstract java.lang.Object |
createNode(java.lang.Object name) |
protected abstract java.lang.Object |
createNode(java.lang.Object name,
java.util.Map attributes) |
protected abstract java.lang.Object |
createNode(java.lang.Object name,
java.util.Map attributes,
java.lang.Object value) |
protected abstract java.lang.Object |
createNode(java.lang.Object name,
java.lang.Object value) |
protected java.lang.Object |
doInvokeMethod(java.lang.String methodName,
java.lang.Object name,
java.lang.Object args) |
protected java.lang.Object |
getCurrent() |
protected java.lang.Object |
getName(java.lang.String methodName)
A hook to allow names to be converted into some other object
such as a QName in XML or ObjectName in JMX.
|
java.lang.Object |
invokeMethod(java.lang.String methodName)
Convenience method when no arguments are required
|
java.lang.Object |
invokeMethod(java.lang.String methodName,
java.lang.Object args)
Invokes the given method.
|
protected void |
nodeCompleted(java.lang.Object parent,
java.lang.Object node)
A hook to allow nodes to be processed once they have had all of their
children applied.
|
protected java.lang.Object |
postNodeCompletion(java.lang.Object parent,
java.lang.Object node)
A hook to allow nodes to be processed once they have had all of their
children applied and allows the actual node object that represents
the Markup element to be changed
|
protected void |
setClosureDelegate(Closure closure,
java.lang.Object node)
A strategy method to allow derived builders to use
builder-trees and switch in different kinds of builders.
|
protected void |
setCurrent(java.lang.Object current) |
protected abstract void |
setParent(java.lang.Object parent,
java.lang.Object child) |
getMetaClass, getProperty, setMetaClass, setProperty
public BuilderSupport()
public BuilderSupport(BuilderSupport proxyBuilder)
public BuilderSupport(Closure nameMappingClosure, BuilderSupport proxyBuilder)
public java.lang.Object invokeMethod(java.lang.String methodName)
methodName
- the name of the method to invokepublic java.lang.Object invokeMethod(java.lang.String methodName, java.lang.Object args)
GroovyObject
invokeMethod
in interface GroovyObject
invokeMethod
in class GroovyObjectSupport
methodName
- the name of the method to callargs
- the arguments to use for the method callprotected java.lang.Object doInvokeMethod(java.lang.String methodName, java.lang.Object name, java.lang.Object args)
protected void setClosureDelegate(Closure closure, java.lang.Object node)
closure
- the closure on which to call setDelegate()node
- the node value that we've just created, which could be
a builderprotected abstract void setParent(java.lang.Object parent, java.lang.Object child)
protected abstract java.lang.Object createNode(java.lang.Object name)
protected abstract java.lang.Object createNode(java.lang.Object name, java.lang.Object value)
protected abstract java.lang.Object createNode(java.lang.Object name, java.util.Map attributes)
protected abstract java.lang.Object createNode(java.lang.Object name, java.util.Map attributes, java.lang.Object value)
protected java.lang.Object getName(java.lang.String methodName)
methodName
- the name of the desired methodprotected void nodeCompleted(java.lang.Object parent, java.lang.Object node)
node
- the current node being processedparent
- the parent of the node being processedprotected java.lang.Object postNodeCompletion(java.lang.Object parent, java.lang.Object node)
node
- the current node being processedparent
- the parent of the node being processedprotected java.lang.Object getCurrent()
protected void setCurrent(java.lang.Object current)