org.jacoco.report.csv
Class CSVFormatter

java.lang.Object
  extended by org.jacoco.report.csv.CSVFormatter
All Implemented Interfaces:
IReportFormatter

public class CSVFormatter
extends Object
implements IReportFormatter

Report formatter that will create a single CSV file. By default the filename used will be the name of the session.

Version:
0.4.1.20101007204400
Author:
Brock Janiczak

Constructor Summary
CSVFormatter()
           
 
Method Summary
 IReportVisitor createReportVisitor(ICoverageNode root, List<SessionInfo> sessionInfos, Collection<ExecutionData> executionData)
          Creates a visitor for root of a coverage data tree.
 ILanguageNames getLanguageNames()
          Returns the language names call-back used in this report.
 void setLanguageNames(ILanguageNames languageNames)
          Sets the implementation for language name display.
 void setOutputEncoding(String outputEncoding)
          Sets the encoding used for generated CSV document.
 void setReportOutput(ISingleReportOutput output)
          Sets the report output callback for this report formatter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CSVFormatter

public CSVFormatter()
Method Detail

createReportVisitor

public IReportVisitor createReportVisitor(ICoverageNode root,
                                          List<SessionInfo> sessionInfos,
                                          Collection<ExecutionData> executionData)
                                   throws IOException
Description copied from interface: IReportFormatter
Creates a visitor for root of a coverage data tree.

Specified by:
createReportVisitor in interface IReportFormatter
Parameters:
root - report root node
sessionInfos - list of chronological ordered SessionInfo objects where execution data has been collected for this report.
executionData - collection of all ExecutionData objects that are considered for this report
Returns:
visitor for the root node
Throws:
IOException

setReportOutput

public void setReportOutput(ISingleReportOutput output)
Sets the report output callback for this report formatter. This is a mandatory property.

Parameters:
output - file output

setLanguageNames

public void setLanguageNames(ILanguageNames languageNames)
Sets the implementation for language name display. Java language names are defined by default.

Parameters:
languageNames - converter for language specific names

getLanguageNames

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

Returns:
language names

setOutputEncoding

public void setOutputEncoding(String outputEncoding)
Sets the encoding used for generated CSV document. Default is UTF-8.

Parameters:
outputEncoding - CSV output encoding