public class NodeBuilder
extends BuilderSupport
A helper class for creating nested trees of Node objects for handling arbitrary data
| Type Params | Return Type | Name and description |
|---|---|---|
|
protected Object |
createNode(Object name)* Creates a node with the given name. * *
|
|
protected Object |
createNode(Object name, Object value)* Creates a node with the given name and value. * *
|
|
protected Object |
createNode(Object name, Map attributes)* Creates a node with the given name and attributes. * *
|
|
protected Object |
createNode(Object name, Map attributes, Object value)* Creates a node with the given name, attributes, and value. * *
|
|
protected Node |
getCurrentNode()Returns the current node being built. |
|
public static NodeBuilder |
newInstance()Creates a new NodeBuilder. |
|
protected void |
setParent(Object parent, Object child)* Links a newly created child node to its parent. * *
|
| Methods inherited from class | Name |
|---|---|
class BuilderSupport |
createNode, createNode, createNode, createNode, doInvokeMethod, getCurrent, getName, invokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate, setCurrent, setParent |
class GroovyObjectSupport |
getMetaClass, setMetaClass |
* Creates a node with the given name. * *
name - the node name
** Creates a node with the given name and value. * *
name - the node name
*value - the node value
** Creates a node with the given name and attributes. * *
name - the node name
*attributes - the node attributes
** Creates a node with the given name, attributes, and value. * *
name - the node name
*attributes - the node attributes
*value - the node value
*Returns the current node being built.
null if none is active Creates a new NodeBuilder.