groovy.util
Class BuilderSupport

java.lang.Object
  |
  +--groovy.lang.GroovyObjectSupport
        |
        +--groovy.util.BuilderSupport
All Implemented Interfaces:
GroovyObject
Direct Known Subclasses:
AntBuilder, DOMBuilder, MarkupBuilder, Namespace, NodeBuilder, SAXBuilder, SwingBuilder

public abstract class BuilderSupport
extends GroovyObjectSupport

An abstract base class for creating arbitrary nested trees of objects or events

Version:
$Revision: 1.3 $
Author:
James Strachan

Constructor Summary
BuilderSupport()
           
BuilderSupport(groovy.util.BuilderSupport proxyBuilder)
           
BuilderSupport(groovy.lang.Closure nameMappingClosure, groovy.util.BuilderSupport proxyBuilder)
           
 
Method Summary
protected abstract  Object createNode(Object name)
           
protected abstract  Object createNode(Object name, Map attributes)
           
protected abstract  Object createNode(Object name, Object value)
           
protected  Object doInvokeMethod(String methodName, Object name, Object args)
           
protected  Object getCurrent()
           
protected  Object getName(String methodName)
          A hook to allow names to be converted into some other object such as a QName in XML or ObjectName in JMX
 Object invokeMethod(String methodName, Object args)
          Invokes the given method
protected  void nodeCompleted(Object parent, Object node)
          A hook to allow nodes to be processed once they have had all of their children applied
protected abstract  void setParent(Object parent, Object child)
           
 
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, getProperty, setMetaClass, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BuilderSupport

public BuilderSupport()

BuilderSupport

public BuilderSupport(groovy.util.BuilderSupport proxyBuilder)

BuilderSupport

public BuilderSupport(groovy.lang.Closure nameMappingClosure,
                      groovy.util.BuilderSupport proxyBuilder)
Method Detail

invokeMethod

public Object invokeMethod(String methodName,
                           Object args)
Description copied from interface: GroovyObject
Invokes the given method

Specified by:
invokeMethod in interface GroovyObject
Overrides:
invokeMethod in class GroovyObjectSupport

doInvokeMethod

protected Object doInvokeMethod(String methodName,
                                Object name,
                                Object args)

setParent

protected abstract void setParent(Object parent,
                                  Object child)

createNode

protected abstract Object createNode(Object name)

createNode

protected abstract Object createNode(Object name,
                                     Object value)

createNode

protected abstract Object createNode(Object name,
                                     Map attributes)

getName

protected Object getName(String methodName)
A hook to allow names to be converted into some other object such as a QName in XML or ObjectName in JMX

Parameters:
methodName -
Returns:

nodeCompleted

protected void nodeCompleted(Object parent,
                             Object node)
A hook to allow nodes to be processed once they have had all of their children applied


getCurrent

protected Object getCurrent()


Copyright © 2003 The Codehaus. All Rights Reserved.