Package groovy.xml

Class NamespaceBuilderSupport

  • All Implemented Interfaces:
    GroovyObject

    public class NamespaceBuilderSupport
    extends BuilderSupport
    A helper class for creating namespaced GroovyMarkup
    • 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,
                                                 java.lang.String prefix)
      • 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