XmlFileContentMerger (Gradle API 2.14.1)

Package: org.gradle.plugins.ide.api

## [Java] Class XmlFileContentMerger

- org.gradle.plugins.ide.api.XmlFileContentMerger

- Models the generation/parsing/merging capabilities. Adds XML-related hooks.

  For examples see docs for EclipseProject or IdeaProject and others.

- - ### Constructor Summary

    Constructors
    Constructor and description
    `XmlFileContentMerger (org.gradle.internal.xml.XmlTransformer xmlTransformer)`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `org.gradle.internal.xml.XmlTransformer` | `getXmlTransformer()`
    `void` | `setXmlTransformer(org.gradle.internal.xml.XmlTransformer xmlTransformer)`
    `void` | `withXml(groovy.lang.Closure closure)` Adds a closure to be called when the file has been created.
    `void` | `withXml(Action<? super XmlProvider> action)` Adds an action to be called when the file has been created.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class FileContentMerger` | `beforeMerged, getBeforeMerged, getWhenMerged, setBeforeMerged, setWhenMerged, whenMerged`
    `class groovy.lang.GroovyObjectSupport` | `groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()`

- - ### Constructor Detail

    - #### public XmlFileContentMerger(org.gradle.internal.xml.XmlTransformer xmlTransformer)

  - ### Method Detail

    - #### public org.gradle.internal.xml.XmlTransformer getXmlTransformer()

    - #### public void setXmlTransformer(org.gradle.internal.xml.XmlTransformer xmlTransformer)

    - #### public void withXml(groovy.lang.Closure closure)

      Adds a closure to be called when the file 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.

      For examples see docs for EclipseProject or IdeaProject and others.

      Parameters:
        `closure` - The closure to execute when the XML has been created.

    - #### @Incubating public void withXml(Action<? super XmlProvider> action)

      Adds an action to be called when the file has been created.

      See withXml(Closure)

      Parameters:
        `action` - The action to execute when the XML has been created.