org.gradle.plugins.ide.api

## Class PropertiesFileContentMerger

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

- All Implemented Interfaces:
    GroovyObject

      public class PropertiesFileContentMerger
      extends FileContentMerger

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

  For examples see docs for `EclipseJdt` and others.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PropertiesFileContentMerger(org.gradle.api.internal.PropertiesTransformer transformer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.gradle.api.internal.PropertiesTransformer` | `getTransformer()`
    `void` | `setTransformer(org.gradle.api.internal.PropertiesTransformer transformer)`
    `void` | `withProperties(Action<Properties> action)` Adds an action to be called when the file has been created.
    `void` | `withProperties(Closure closure)` Adds a closure to be called when the file has been created.

    - ### Methods inherited from class org.gradle.plugins.ide.api.FileContentMerger

      `beforeMerged, getBeforeMerged, getWhenMerged, setBeforeMerged, setWhenMerged, whenMerged`

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

    - #### PropertiesFileContentMerger

          public PropertiesFileContentMerger(org.gradle.api.internal.PropertiesTransformer transformer)

  - ### Method Detail

    - #### getTransformer

          public org.gradle.api.internal.PropertiesTransformer getTransformer()

    - #### setTransformer

          public void setTransformer(org.gradle.api.internal.PropertiesTransformer transformer)

    - #### withProperties

          public void withProperties(Closure closure)

      Adds a closure to be called when the file has been created. The `Properties` are passed to the closure as a parameter. The closure can modify the Properties before they are written to the output file.

      For examples see docs for `EclipseJdt` and others.

      Parameters:
        `closure` - The closure to execute when the Properties have been created.

    - #### withProperties

          @Incubating
          public void withProperties(Action<Properties> action)

      Adds an action to be called when the file has been created. The `Properties` are passed to the action as a parameter. The action can modify the Properties before they are written to the output file.

      For examples see docs for `EclipseJdt` and others.

      Parameters:
        `action` - The action to execute when the Properties have been created.