org.gradle.plugins.ide.api

## Class FileContentMerger

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

- Direct Known Subclasses:
    PropertiesFileContentMerger, XmlFileContentMerger

      public class FileContentMerger
      extends Object

  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(Action<?> action)` Adds an action to be called after content is loaded from existing file but before gradle build information is merged.
    `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(Action<?> action)` Adds an action to be called after content is loaded from existing file and after gradle build information is merged.
    `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 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(Action<?> action)

      Adds an action 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:
        `action` - The action to execute.

    - #### whenMerged

          public void whenMerged(Action<?> action)

      Adds an action 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:
        `action` - The action to execute.

    - #### 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.