groovy.xml

## Class NamespaceBuilderSupport

- java.lang.Object
- - groovy.lang.GroovyObjectSupport
  - - groovy.util.BuilderSupport
    - - groovy.xml.NamespaceBuilderSupport

- All Implemented Interfaces:
    GroovyObject

      public class NamespaceBuilderSupport
      extends BuilderSupport

  A helper class for creating namespaced GroovyMarkup
  Author:
    James Strachan, Paul King, Denver Dino, Marc Guillemot

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `NamespaceBuilderSupport(BuilderSupport builder)`
    `NamespaceBuilderSupport(BuilderSupport builder, java.util.Map nsMap)`
    `NamespaceBuilderSupport(BuilderSupport builder, java.lang.String uri)`
    `NamespaceBuilderSupport(BuilderSupport builder, java.lang.String uri, java.lang.String prefix)`
    `NamespaceBuilderSupport(BuilderSupport builder, java.lang.String uri, java.lang.String prefix, boolean autoPrefix)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.Object` | `createNode(java.lang.Object name)`
    `protected java.lang.Object` | `createNode(java.lang.Object name, java.util.Map attributes)`
    `protected java.lang.Object` | `createNode(java.lang.Object name, java.util.Map attributes, java.lang.Object value)`
    `protected java.lang.Object` | `createNode(java.lang.Object name, java.lang.Object value)`
    `NamespaceBuilderSupport` | `declareNamespace(java.util.Map nsMap)`
    `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, java.lang.Object args)` Allow automatic detection of namespace declared in the attributes
    `NamespaceBuilderSupport` | `namespace(java.lang.String namespaceURI)`
    `NamespaceBuilderSupport` | `namespace(java.lang.String namespaceURI, java.lang.String prefix)`
    `protected void` | `setCurrent(java.lang.Object current)`
    `protected void` | `setParent(java.lang.Object parent, java.lang.Object child)`

    - ### Methods inherited from class groovy.util.BuilderSupport

      `doInvokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate`

    - ### 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

    - #### NamespaceBuilderSupport

          public NamespaceBuilderSupport(BuilderSupport builder)

    - #### NamespaceBuilderSupport

          public NamespaceBuilderSupport(BuilderSupport builder,
                                         java.lang.String uri)

    - #### NamespaceBuilderSupport

          public NamespaceBuilderSupport(BuilderSupport builder,
                                         java.lang.String uri,
                                         java.lang.String prefix)

    - #### NamespaceBuilderSupport

          public NamespaceBuilderSupport(BuilderSupport builder,
                                         java.lang.String uri,
                                         java.lang.String prefix,
                                         boolean autoPrefix)

    - #### NamespaceBuilderSupport

          public NamespaceBuilderSupport(BuilderSupport builder,
                                         java.util.Map nsMap)

  - ### Method Detail

    - #### namespace

          public NamespaceBuilderSupport namespace(java.lang.String namespaceURI)

    - #### namespace

          public NamespaceBuilderSupport namespace(java.lang.String namespaceURI,
                                                   java.lang.String prefix)

    - #### declareNamespace

          public NamespaceBuilderSupport declareNamespace(java.util.Map nsMap)

    - #### getCurrent

          protected java.lang.Object getCurrent()

      Overrides:
        `getCurrent` in class `BuilderSupport`

    - #### setCurrent

          protected void setCurrent(java.lang.Object current)

      Overrides:
        `setCurrent` in class `BuilderSupport`

    - #### setParent

          protected void setParent(java.lang.Object parent,
                                   java.lang.Object child)

      Specified by:
        `setParent` in class `BuilderSupport`

    - #### getName

          protected java.lang.Object getName(java.lang.String methodName)

      Description copied from class: `BuilderSupport`
      A hook to allow names to be converted into some other object such as a QName in XML or ObjectName in JMX.
      Overrides:
        `getName` in class `BuilderSupport`
      Parameters:
        `methodName` - the name of the desired method
      Returns:
        the object representing the name

    - #### invokeMethod

          public java.lang.Object invokeMethod(java.lang.String methodName,
                                               java.lang.Object args)

      Allow automatic detection of namespace declared in the attributes
      Specified by:
        `invokeMethod` in interface `GroovyObject`
      Overrides:
        `invokeMethod` in class `BuilderSupport`
      Parameters:
        `methodName` - the name of the method to call
        `args` - the arguments to use for the method call
      Returns:
        the result of invoking the method

    - #### createNode

          protected java.lang.Object createNode(java.lang.Object name)

      Specified by:
        `createNode` in class `BuilderSupport`

    - #### createNode

          protected java.lang.Object createNode(java.lang.Object name,
                                                java.lang.Object value)

      Specified by:
        `createNode` in class `BuilderSupport`

    - #### createNode

          protected java.lang.Object createNode(java.lang.Object name,
                                                java.util.Map attributes)

      Specified by:
        `createNode` in class `BuilderSupport`

    - #### createNode

          protected java.lang.Object createNode(java.lang.Object name,
                                                java.util.Map attributes,
                                                java.lang.Object value)

      Specified by:
        `createNode` in class `BuilderSupport`