Interface ReportContainer<T extends Report>
-
- Type Parameters:
T
- The base report type for reports of this container.
- All Superinterfaces:
Collection<T>
,org.gradle.util.Configurable<ReportContainer<T>>
,DomainObjectCollection<T>
,Iterable<T>
,NamedDomainObjectCollection<T>
,NamedDomainObjectSet<T>
,Set<T>
- All Known Subinterfaces:
BuildDashboardReports
,CheckstyleReports
,CodeNarcReports
,DependencyReportContainer
,FindBugsReports
,JacocoReportsContainer
,JDependReports
,PmdReports
,TestTaskReports
public interface ReportContainer<T extends Report> extends NamedDomainObjectSet<T>, org.gradle.util.Configurable<ReportContainer<T>>
A container ofReport
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 itsenabled
property.ReportContainer
implementations are immutable in that standard collection methods such asadd()
,remove()
andclear()
will throw anReportContainer.ImmutableViolationException
. However, implementations may provide new methods that allow the addition of new report object and/or the removal of existing report objects.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ReportContainer.ImmutableViolationException
The exception thrown when any of this container's mutation methods are called.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SortedMap<String,T>
getAsMap()
Returns the objects in this collection, as a map from object name to object instance.NamedDomainObjectSet<T>
getEnabled()
Returns an immutable collection of all the enabledReport
objects in this container.Map<String,File>
getEnabledDirectoryReportDestinations()
Map<String,File>
getEnabledFileReportDestinations()
SortedSet<String>
getEnabledReportNames()
Namer<T>
getNamer()
An object that represents the naming strategy used to name objects of this collection.SortedSet<String>
getNames()
Returns the names of the objects in this collection as a Set of Strings.List<Rule>
getRules()
Returns the rules used by this collection.boolean
isEmpty()
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface org.gradle.api.DomainObjectCollection
all, all, whenObjectAdded, whenObjectAdded, whenObjectRemoved, whenObjectRemoved, withType, withType
-
Methods inherited from interface org.gradle.api.NamedDomainObjectCollection
add, addAll, addRule, addRule, addRule, findByName, getAt, getByName, getByName, getByName
-
Methods inherited from interface org.gradle.api.NamedDomainObjectSet
findAll, matching, matching, withType
-
-
-
-
Method Detail
-
getEnabled
@Internal NamedDomainObjectSet<T> getEnabled()
Returns an immutable collection of all the enabledReport
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.
- Returns:
- The enabled reports.
-
getNamer
@Internal Namer<T> getNamer()
Description copied from interface:NamedDomainObjectCollection
An object that represents the naming strategy used to name objects of this collection.- Specified by:
getNamer
in interfaceNamedDomainObjectCollection<T extends Report>
- Returns:
- Object representing the naming strategy.
-
getAsMap
@Internal SortedMap<String,T> getAsMap()
Description copied from interface:NamedDomainObjectCollection
Returns the objects in this collection, as a map from object name to object instance.
The map is ordered by the natural ordering of the object names (i.e. keys).
- Specified by:
getAsMap
in interfaceNamedDomainObjectCollection<T extends Report>
- Returns:
- The objects. Returns an empty map if this collection is empty.
-
getNames
@Internal SortedSet<String> getNames()
Description copied from interface:NamedDomainObjectCollection
Returns the names of the objects in this collection as a Set of Strings.
The set of names is in natural ordering.
- Specified by:
getNames
in interfaceNamedDomainObjectCollection<T extends Report>
- Returns:
- The names. Returns an empty set if this collection is empty.
-
getRules
@Internal List<Rule> getRules()
Description copied from interface:NamedDomainObjectCollection
Returns the rules used by this collection.- Specified by:
getRules
in interfaceNamedDomainObjectCollection<T extends Report>
- Returns:
- The rules, in the order they will be applied.
-
isEmpty
@Internal boolean isEmpty()
-
getEnabledDirectoryReportDestinations
@Incubating @OutputDirectories Map<String,File> getEnabledDirectoryReportDestinations()
-
getEnabledFileReportDestinations
@Incubating @OutputFiles Map<String,File> getEnabledFileReportDestinations()
-
getEnabledReportNames
@Incubating @Input SortedSet<String> getEnabledReportNames()
-
-