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

## org.gradle.plugins.ide.api
[Java] Class GeneratorTask

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.plugins.ide.api.GeneratorTask

    public class GeneratorTask
    extends ConventionTask

A `GeneratorTask` generates a configuration file based on a domain object of type T. When executed the task:

- loads the object from the input file, if it exists.
- Calls the beforeConfigured actions, passing the object to each action.
- Configures the object in some task-specific way.
- Calls the afterConfigured actions, passing the object to each action.
- writes the object to the output file.

Parameters:
  `` - The domain object for the configuration file.

Field Summary
`protected ActionBroadcast` | `afterConfigured`
`protected ActionBroadcast` | `beforeConfigured`
`protected Object` | `domainObject`
`protected Generator` | `generator`

Constructor Summary
`GeneratorTask()`

Method Summary
`File` | `getInputFile()` The input file to load the initial configuration from.
`File` | `getOutputFile()` The output file to write the final configuration to.
`void` | `setInputFile(File inputFile)` Sets the input file to load the initial configuration from.
`void` | `setOutputFile(File outputFile)` Sets the output file to write the final configuration to.

Field Detail

### afterConfigured

    protected final ActionBroadcast afterConfigured

### beforeConfigured

    protected final ActionBroadcast beforeConfigured

### domainObject

    protected Object domainObject

### generator

    protected Generator generator

Constructor Detail

### GeneratorTask

    public GeneratorTask()

Method Detail

### getInputFile

    public File getInputFile()

  The input file to load the initial configuration from. Defaults to the output file. If the specified input file does not exist, this task uses some default initial configuration.
  Returns:
    The input file.

### getOutputFile

    @OutputFile
    public File getOutputFile()

  The output file to write the final configuration to.
  Returns:
    The output file.

### setInputFile

    public void setInputFile(File inputFile)

  Sets the input file to load the initial configuration from.
  Parameters:
    `inputFile` - The input file. Use null to use the output file.

### setOutputFile

    public void setOutputFile(File outputFile)

  Sets the output file to write the final configuration to.
  Parameters:
    `outputFile` - The output file.

Gradle API 1.10