Groovy Documentation

org.codenarc.report
Class AbstractReportWriter

java.lang.Object
  org.codenarc.report.AbstractReportWriter

class AbstractReportWriter

Abstract superclass for ReportWriter implementation classes.

Subclasses must implement the writeReport(ResultsNode, MetricSet, Writer) method and define a defaultOutputFile property.

author:
Chris Mair
version:
$Revision: 333 $ - $Date: 2010-04-29 22:40:15 -0400 (Thu, 29 Apr 2010) $


Property Summary
protected static def BASE_MESSAGES_BUNDLE

protected static def CODENARC_URL

protected static def CUSTOM_MESSAGES_BUNDLE

protected def LOG

protected static def VERSION_FILE

protected def customMessagesBundleName

protected def getTimestamp

protected def initializeResourceBundle

String outputFile

protected def resourceBundle

Object writeToStandardOut

 
Constructor Summary
AbstractReportWriter()

 
Method Summary
protected String getCodeNarcVersion()

protected String getDescriptionForRule(Rule rule)

protected String getFormattedTimestamp()

protected String getHtmlDescriptionForRule(Rule rule)

protected String getResourceBundleString(String resourceKey, String defaultString = '?', boolean logWarning = true)

protected List getSortedRules(AnalysisContext analysisContext)

protected void initializeDefaultResourceBundle()

protected boolean isEnabled(Rule rule)

void writeReport(Writer writer, AnalysisContext analysisContext, Results results)

void writeReport(AnalysisContext analysisContext, Results results)

Write out a report for the specified analysis results

 
Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll
 

Property Detail

BASE_MESSAGES_BUNDLE

protected static final def BASE_MESSAGES_BUNDLE


CODENARC_URL

protected static final def CODENARC_URL


CUSTOM_MESSAGES_BUNDLE

protected static final def CUSTOM_MESSAGES_BUNDLE


LOG

protected final def LOG


VERSION_FILE

protected static final def VERSION_FILE


customMessagesBundleName

protected def customMessagesBundleName


getTimestamp

protected def getTimestamp


initializeResourceBundle

protected def initializeResourceBundle


outputFile

String outputFile


resourceBundle

protected def resourceBundle


writeToStandardOut

Object writeToStandardOut


 
Constructor Detail

AbstractReportWriter

AbstractReportWriter()


 
Method Detail

getCodeNarcVersion

protected String getCodeNarcVersion()


getDescriptionForRule

protected String getDescriptionForRule(Rule rule)


getFormattedTimestamp

protected String getFormattedTimestamp()


getHtmlDescriptionForRule

protected String getHtmlDescriptionForRule(Rule rule)


getResourceBundleString

protected String getResourceBundleString(String resourceKey, String defaultString = '?', boolean logWarning = true)


getSortedRules

protected List getSortedRules(AnalysisContext analysisContext)


initializeDefaultResourceBundle

protected void initializeDefaultResourceBundle()


isEnabled

protected boolean isEnabled(Rule rule)


writeReport

public void writeReport(Writer writer, AnalysisContext analysisContext, Results results)


writeReport

void writeReport(AnalysisContext analysisContext, Results results)
Write out a report for the specified analysis results
param:
analysisContext - the AnalysisContext containing the analysis configuration information
param:
results - the analysis results


 

Groovy Documentation