# ReportContainer

API Documentation: | `ReportContainer`

A container of `Report` objects, that represent potential reports.

Things that produce reports (typically tasks) expose a report container that contains `Report` objects for each possible report that they can produce. Each report object can be configured individually, including whether or not it should be produced by way of its `Report.setEnabled(boolean)` property.

`ReportContainer` implementations are immutable in that standard collection methods such as `add()`, `remove()` and `clear()` will throw an `ImmutableViolationException`. However, implementations may provide new methods that allow the addition of new report object and/or the removal of existing report objects.

### Properties

Property | Description
`enabled` | Returns an immutable collection of all the enabled `Report` objects in this container.

### Methods

Method | Description
`getAt(name)` | Locates an object by name, failing if there is no such task. This method is identical to `NamedDomainObjectCollection.getByName(java.lang.String)`. You can call this method in your build script by using the groovy `[]` operator.
`getByName(name)` | Locates an object by name, failing if there is no such object.
`getByName(name, configureClosure)` | Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.
`getByName(name, configureAction)` | Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.

### Script blocks

No script blocks

### Property details

#### ``NamedDomainObjectSet`<`T`>` `enabled` (read-only)

Returns an immutable collection of all the enabled `Report` objects in this container.

The returned collection is live. That is, as reports are enabled/disabled the returned collection always reflects the current set of enabled reports.

### Method details

#### `T` `getAt`(`String` name)

Locates an object by name, failing if there is no such task. This method is identical to `NamedDomainObjectCollection.getByName(java.lang.String)`. You can call this method in your build script by using the groovy `[]` operator.

#### `T` `getByName`(`String` name)

Locates an object by name, failing if there is no such object.

#### `T` `getByName`(`String` name, `Closure` configureClosure)

Locates an object by name, failing if there is no such object. The given configure closure is executed against the object before it is returned from this method. The object is passed to the closure as its delegate.

#### `T` `getByName`(`String` name, ``Action`<? super `T`>` configureAction)

Locates an object by name, failing if there is no such object. The given configure action is executed against the object before it is returned from this method.