org.jacoco.report.csv
Class CsvReportFile

java.lang.Object
  extended by org.jacoco.report.csv.CsvReportFile
All Implemented Interfaces:
IReportVisitor

public class CsvReportFile
extends Object
implements IReportVisitor

File containing all coverage information in the session.

Version:
$Revision: $
Author:
Brock Janiczak

Field Summary
static ICoverageNode.CounterEntity[] COUNTERS
          Counters that will be written out at the lowest level of the report.
 
Constructor Summary
CsvReportFile(ILanguageNames languageNames, OutputStream output, String encoding)
          Creates a new CSV report from the supplied configuration and session data
CsvReportFile(ILanguageNames languageNames, Writer writer)
          Creates a new CSV report from the supplied configuration and session data
 
Method Summary
 ILanguageNames getLanguageNames()
          Returns the language names call-back used in this report.
 DelimitedWriter getWriter()
          Returns the writer used for output of this report
 IReportVisitor visitChild(ICoverageNode node)
          Called for every direct child.
 void visitEnd(ISourceFileLocator sourceFileLocator)
          Called at the very end, when all child node have been processed and the counters for this node are properly populated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COUNTERS

public static ICoverageNode.CounterEntity[] COUNTERS
Counters that will be written out at the lowest level of the report. By default, this is at the class level

Constructor Detail

CsvReportFile

public CsvReportFile(ILanguageNames languageNames,
                     Writer writer)
              throws IOException
Creates a new CSV report from the supplied configuration and session data

Parameters:
languageNames - Language name callback used for name translation
writer - Writer for CSV output
Throws:
IOException - Thrown if there were problems creating the output CSV file

CsvReportFile

public CsvReportFile(ILanguageNames languageNames,
                     OutputStream output,
                     String encoding)
              throws IOException
Creates a new CSV report from the supplied configuration and session data

Parameters:
languageNames - Language name callback used for name translation
output - OutputStream to the CSV file to
encoding - character encoding of the CSV file
Throws:
IOException - Thrown if there were problems creating the output CSV file
Method Detail

visitChild

public IReportVisitor visitChild(ICoverageNode node)
                          throws IOException
Description copied from interface: IReportVisitor
Called for every direct child.

Specified by:
visitChild in interface IReportVisitor
Parameters:
node - Node for the child in the implementation class specific to this type. The counters are may yet be populated.
Returns:
visitor instance for processing the child node
Throws:
IOException - in case of IO problems with the report writer

visitEnd

public void visitEnd(ISourceFileLocator sourceFileLocator)
              throws IOException
Description copied from interface: IReportVisitor
Called at the very end, when all child node have been processed and the counters for this node are properly populated.

Specified by:
visitEnd in interface IReportVisitor
Parameters:
sourceFileLocator - source file locator valid for this node
Throws:
IOException - in case of IO problems with the report writer

getWriter

public DelimitedWriter getWriter()
Returns the writer used for output of this report

Returns:
delimited writer

getLanguageNames

public ILanguageNames getLanguageNames()
Returns the language names call-back used in this report.

Returns:
language names