Table of Contents
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.getRequired()
required} 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.
Method | Description |
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. |
named(name) | Locates a object by name, without triggering its creation or configuration, failing if there is no such object. |
named(name, type) | Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. |
named(name, type, configurationAction) | Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider. |
named(name, configurationAction) | Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider. |
named(nameFilter) | Incubating Returns a collection containing the objects with names matching the provided filter. The returned collection is live, so that when matching objects are added to this collection, they are also visible in the filtered collection. This method will NOT cause any pending objects in this container to be realized. |
NamedDomainObjectSet
<T
>
enabled
(read-only)
NamedDomainObjectSet
<T
>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.
T
getByName
(String
name)
Locates an object by name, failing if there is no such object.
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.
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.
NamedDomainObjectProvider
<T
>
named
(String
name)
NamedDomainObjectProvider
<T
>Locates a object by name, without triggering its creation or configuration, failing if there is no such object.
NamedDomainObjectProvider
<S
>
named
(String
name, Class
<S
>
type)
NamedDomainObjectProvider
<S
>Class
<S
>Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object.
NamedDomainObjectProvider
<S
>
named
(String
name, Class
<S
>
type, Action
<? super S
>
configurationAction)
NamedDomainObjectProvider
<S
>Class
<S
>Action
<? super S
>Locates a object by name and type, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.
NamedDomainObjectProvider
<T
>
named
(String
name, Action
<? super T
>
configurationAction)
NamedDomainObjectProvider
<T
>Action
<? super T
>Locates a object by name, without triggering its creation or configuration, failing if there is no such object. The given configure action is executed against the object before it is returned from the provider.
NamedDomainObjectCollection
<T
>
named
(Spec
<String
>
nameFilter)
NamedDomainObjectCollection
<T
>Spec
<String
>Note: This method is incubating and may change in a future version of Gradle.
Returns a collection containing the objects with names matching the provided filter. The returned collection is live, so that when matching objects are added to this collection, they are also visible in the filtered collection. This method will NOT cause any pending objects in this container to be realized.