org.gradle.plugins.ide.api

## Class FileContentMerger

- java.lang.Object
- - groovy.lang.GroovyObjectSupport
  - - org.gradle.plugins.ide.api.FileContentMerger

- All Implemented Interfaces:
    GroovyObject
  Direct Known Subclasses:
    PropertiesFileContentMerger, XmlFileContentMerger

      public class FileContentMerger
      extends GroovyObjectSupport

  Models the generation/parsing/merging capabilities.

  For examples see docs for `EclipseProject` or `IdeaProject` and others.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FileContentMerger()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeMerged(Closure closure)` Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.
    `org.gradle.listener.ActionBroadcast` | `getBeforeMerged()`
    `org.gradle.listener.ActionBroadcast` | `getWhenMerged()`
    `void` | `setBeforeMerged(org.gradle.listener.ActionBroadcast beforeMerged)`
    `void` | `setWhenMerged(org.gradle.listener.ActionBroadcast whenMerged)`
    `void` | `whenMerged(Closure closure)` Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.

    - ### Methods inherited from class groovy.lang.GroovyObjectSupport

      `getMetaClass, getProperty, invokeMethod, setMetaClass, setProperty`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FileContentMerger

          public FileContentMerger()

  - ### Method Detail

    - #### getWhenMerged

          public org.gradle.listener.ActionBroadcast getWhenMerged()

    - #### setWhenMerged

          public void setWhenMerged(org.gradle.listener.ActionBroadcast whenMerged)

    - #### getBeforeMerged

          public org.gradle.listener.ActionBroadcast getBeforeMerged()

    - #### setBeforeMerged

          public void setBeforeMerged(org.gradle.listener.ActionBroadcast beforeMerged)

    - #### beforeMerged

          public void beforeMerged(Closure closure)

      Adds a closure to be called after content is loaded from existing file but before gradle build information is merged.

      This is advanced api that gives access to internal implementation. It might be useful if you want to alter the way gradle build information is merged into existing file content.

      For examples see docs for `EclipseProject` or `IdeaProject` and others.

      Parameters:
        `closure` - The closure to execute.

    - #### whenMerged

          public void whenMerged(Closure closure)

      Adds a closure to be called after content is loaded from existing file and after gradle build information is merged.

      This is advanced api that gives access to internal implementation of idea plugin. Use it only to tackle some tricky edge cases.

      For examples see docs for `EclipseProject` or `IdeaProject` and others.

      Parameters:
        `closure` - The closure to execute.