|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jacoco.report.html.table.CounterColumn
public abstract class CounterColumn
Column that prints the counter values of entities for each item and a summary in the footer. If the total number of items is zero, no column is emitted at all. The implementation is stateful, instances must not be used in parallel.
Constructor Summary | |
---|---|
protected |
CounterColumn(ICoverageNode.CounterEntity entity,
Locale locale,
Comparator<ICoverageNode> comparator)
Creates a new column that is based on the ICounter for the given
entity. |
Method Summary | |
---|---|
void |
footer(HTMLElement td,
ICoverageNode total,
Resources resources,
ReportOutputFolder base)
Renders the footer for this column. |
Comparator<ITableItem> |
getComparator()
Returns the comparator to sort this table column. |
protected abstract int |
getValue(ICounter counter)
Retrieves the respective value from the counter. |
boolean |
init(List<? extends ITableItem> items,
ICoverageNode total)
Initializes the column before any output method is called. |
void |
item(HTMLElement td,
ITableItem item,
Resources resources,
ReportOutputFolder base)
Renders a single item in this column. |
static CounterColumn |
newCovered(ICoverageNode.CounterEntity entity,
Locale locale)
Creates a new column that shows the covered count for the given entity. |
static CounterColumn |
newMissed(ICoverageNode.CounterEntity entity,
Locale locale)
Creates a new column that shows the missed count for the given entity. |
static CounterColumn |
newTotal(ICoverageNode.CounterEntity entity,
Locale locale)
Creates a new column that shows the total count for the given entity. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CounterColumn(ICoverageNode.CounterEntity entity, Locale locale, Comparator<ICoverageNode> comparator)
ICounter
for the given
entity.
entity
- counter entity for this columnlocale
- locale for rendering numberscomparator
- comparator for the nodes of this columnMethod Detail |
---|
public static CounterColumn newTotal(ICoverageNode.CounterEntity entity, Locale locale)
entity
- counter entity for this columnlocale
- locale for rendering numbers
public static CounterColumn newMissed(ICoverageNode.CounterEntity entity, Locale locale)
entity
- counter entity for this columnlocale
- locale for rendering numbers
public static CounterColumn newCovered(ICoverageNode.CounterEntity entity, Locale locale)
entity
- counter entity for this columnlocale
- locale for rendering numbers
public boolean init(List<? extends ITableItem> items, ICoverageNode total)
IColumnRenderer
init
in interface IColumnRenderer
items
- all items that will be displayed in the tabletotal
- the summary of all coverage data items in the table
true
if the column should be visiblepublic void footer(HTMLElement td, ICoverageNode total, Resources resources, ReportOutputFolder base) throws IOException
IColumnRenderer
footer
in interface IColumnRenderer
td
- the parent table celltotal
- the summary of all coverage data items in the tableresources
- static resources that might be referencedbase
- base folder of the table
IOException
- in case of IO problems with the element outputpublic void item(HTMLElement td, ITableItem item, Resources resources, ReportOutputFolder base) throws IOException
IColumnRenderer
item
in interface IColumnRenderer
td
- the parent table cellitem
- the item to displayresources
- static resources that might be referencedbase
- base folder of the table
IOException
- in case of IO problems with the element outputpublic Comparator<ITableItem> getComparator()
IColumnRenderer
getComparator
in interface IColumnRenderer
protected abstract int getValue(ICounter counter)
counter
- counter object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |