Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks
[Java] Class XmlGeneratorTask

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.GeneratorTask
              org.gradle.api.tasks.XmlGeneratorTask

    public abstract class XmlGeneratorTask
    extends GeneratorTask

A convenience superclass for those tasks which generate XML configuration files from a domain object of type T.

Parameters:
  `` - The domain object type.

Field Summary

Fields inherited from class GeneratorTask
generator

Constructor Summary
`XmlGeneratorTask()`

Method Summary
`protected void` | `configure(T object)`
`protected T` | `create()`
`protected XmlTransformer` | `getXmlTransformer()`
`void` | `withXml(groovy.lang.Closure closure)` Adds a closure to be called when the XML document has been created.
`void` | `withXml(Action action)` Adds an action to be called when the XML document has been created.

Methods inherited from class GeneratorTask
beforeConfigured, beforeConfigured, getInputFile, getOutputFile, setInputFile, setOutputFile, whenConfigured, whenConfigured

Constructor Detail

### XmlGeneratorTask

    public XmlGeneratorTask()

Method Detail

### configure

    protected void configure(T object)

### create

    protected T create()

### getXmlTransformer

    protected XmlTransformer getXmlTransformer()

### withXml

    public void withXml(groovy.lang.Closure closure)

  Adds a closure to be called when the XML document has been created. The XML is passed to the closure as a parameter in form of a XmlProvider. The closure can modify the XML before it is written to the output file.
  Parameters:
    `closure` - The closure to execute when the XML has been created.

### withXml

    public void withXml(Action action)

  Adds an action to be called when the XML document has been created. The XML is passed to the action as a parameter in form of a XmlProvider. The action can modify the XML before it is written to the output file.
  Parameters:
    `action` - The action to execute when the IPR XML has been created.

Groovy Documentation