org.jacoco.report.html
Class CounterColumn

java.lang.Object
  extended by org.jacoco.report.html.CounterColumn
All Implemented Interfaces:
ICoverageTableColumn

public class CounterColumn
extends Object
implements ICoverageTableColumn

Column that prints the number of missed entities and the total number 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.

Version:
$Revision: $
Author:
Marc R. Hoffmann

Constructor Summary
CounterColumn(String header, ICoverageNode.CounterEntity entity)
          Creates a new column that is based on the ICounter for the given entity.
 
Method Summary
 void footer(HTMLElement tr, ICoverageNode total, Resources resources, ReportOutputFolder base)
          Renders the footer for this column.
 void header(HTMLElement tr, Resources resources, ReportOutputFolder base)
          Renders the header for this column.
 void init(List<ICoverageTableItem> items, ICoverageNode total)
          Initializes the column before any output method is called.
 void item(HTMLElement tr, ICoverageTableItem item, Resources resources, ReportOutputFolder base)
          Renders a single item in this column.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterColumn

public CounterColumn(String header,
                     ICoverageNode.CounterEntity entity)
Creates a new column that is based on the ICounter for the given entity.

Parameters:
header - column header caption
entity - counter entity for this column
Method Detail

init

public void init(List<ICoverageTableItem> items,
                 ICoverageNode total)
Description copied from interface: ICoverageTableColumn
Initializes the column before any output method is called.

Specified by:
init in interface ICoverageTableColumn
Parameters:
items - all items that will be displayed in the table
total - the summary of all coverage data items in the table

header

public void header(HTMLElement tr,
                   Resources resources,
                   ReportOutputFolder base)
            throws IOException
Description copied from interface: ICoverageTableColumn
Renders the header for this column.

Specified by:
header in interface ICoverageTableColumn
Parameters:
tr - the parent table row
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output

footer

public void footer(HTMLElement tr,
                   ICoverageNode total,
                   Resources resources,
                   ReportOutputFolder base)
            throws IOException
Description copied from interface: ICoverageTableColumn
Renders the footer for this column.

Specified by:
footer in interface ICoverageTableColumn
Parameters:
tr - the parent table row
total - the summary of all coverage data items in the table
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output

item

public void item(HTMLElement tr,
                 ICoverageTableItem item,
                 Resources resources,
                 ReportOutputFolder base)
          throws IOException
Description copied from interface: ICoverageTableColumn
Renders a single item in this column.

Specified by:
item in interface ICoverageTableColumn
Parameters:
tr - the parent table row
item - the item to display
resources - static resources that might be referenced
base - base folder of the table
Throws:
IOException - in case of IO problems with the element output