Package 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
-
-
Constructor Summary
Constructors Constructor Description NamespaceBuilderSupport(BuilderSupport builder)
NamespaceBuilderSupport(BuilderSupport builder, String uri)
NamespaceBuilderSupport(BuilderSupport builder, String uri, String prefix)
NamespaceBuilderSupport(BuilderSupport builder, String uri, String prefix, boolean autoPrefix)
NamespaceBuilderSupport(BuilderSupport builder, Map nsMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Object
createNode(Object name)
protected Object
createNode(Object name, Object value)
protected Object
createNode(Object name, Map attributes)
protected Object
createNode(Object name, Map attributes, Object value)
NamespaceBuilderSupport
declareNamespace(Map nsMap)
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)
Allow automatic detection of namespace declared in the attributesNamespaceBuilderSupport
namespace(String namespaceURI)
NamespaceBuilderSupport
namespace(String namespaceURI, String prefix)
protected void
setCurrent(Object current)
protected void
setParent(Object parent, Object child)
-
Methods inherited from class groovy.util.BuilderSupport
doInvokeMethod, invokeMethod, nodeCompleted, postNodeCompletion, setClosureDelegate
-
Methods inherited from class groovy.lang.GroovyObjectSupport
getMetaClass, setMetaClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface groovy.lang.GroovyObject
getProperty, setProperty
-
-
-
-
Constructor Detail
-
NamespaceBuilderSupport
public NamespaceBuilderSupport(BuilderSupport builder)
-
NamespaceBuilderSupport
public NamespaceBuilderSupport(BuilderSupport builder, String uri)
-
NamespaceBuilderSupport
public NamespaceBuilderSupport(BuilderSupport builder, String uri, String prefix)
-
NamespaceBuilderSupport
public NamespaceBuilderSupport(BuilderSupport builder, String uri, String prefix, boolean autoPrefix)
-
NamespaceBuilderSupport
public NamespaceBuilderSupport(BuilderSupport builder, Map nsMap)
-
-
Method Detail
-
namespace
public NamespaceBuilderSupport namespace(String namespaceURI)
-
namespace
public NamespaceBuilderSupport namespace(String namespaceURI, String prefix)
-
declareNamespace
public NamespaceBuilderSupport declareNamespace(Map nsMap)
-
getCurrent
protected Object getCurrent()
- Overrides:
getCurrent
in classBuilderSupport
-
setCurrent
protected void setCurrent(Object current)
- Overrides:
setCurrent
in classBuilderSupport
-
setParent
protected void setParent(Object parent, Object child)
- Specified by:
setParent
in classBuilderSupport
-
getName
protected Object getName(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 classBuilderSupport
- Parameters:
methodName
- the name of the desired method- Returns:
- the object representing the name
-
invokeMethod
public Object invokeMethod(String methodName, Object args)
Allow automatic detection of namespace declared in the attributes- Specified by:
invokeMethod
in interfaceGroovyObject
- Overrides:
invokeMethod
in classBuilderSupport
- Parameters:
methodName
- the name of the method to callargs
- the arguments to use for the method call- Returns:
- the result of invoking the method
-
createNode
protected Object createNode(Object name)
- Specified by:
createNode
in classBuilderSupport
-
createNode
protected Object createNode(Object name, Object value)
- Specified by:
createNode
in classBuilderSupport
-
createNode
protected Object createNode(Object name, Map attributes)
- Specified by:
createNode
in classBuilderSupport
-
createNode
protected Object createNode(Object name, Map attributes, Object value)
- Specified by:
createNode
in classBuilderSupport
-
-