org.codenarc.report
Class AbstractReportWriter

java.lang.Object
  extended by org.codenarc.report.AbstractReportWriter
All Implemented Interfaces:
groovy.lang.GroovyObject, ReportWriter
Direct Known Subclasses:
HtmlReportWriter, TextReportWriter, XmlReportWriter

public abstract class AbstractReportWriter
extends java.lang.Object
implements ReportWriter, groovy.lang.GroovyObject


Field Summary
protected static java.lang.Object BASE_MESSAGES_BUNDLE
           
protected static java.lang.Object CODENARC_URL
           
protected static java.lang.Object CUSTOM_MESSAGES_BUNDLE
           
protected  java.lang.Object customMessagesBundleName
           
protected  java.lang.Object getTimestamp
           
protected  java.lang.Object initializeResourceBundle
           
protected  java.lang.Object resourceBundle
           
protected static java.lang.Object VERSION_FILE
           
 
Constructor Summary
AbstractReportWriter()
           
 
Method Summary
protected  java.lang.String getCodeNarcVersion()
           
protected  java.lang.String getDescriptionForRule(Rule rule)
           
protected  java.lang.String getFormattedTimestamp()
           
protected  java.lang.String getHtmlDescriptionForRule(Rule rule)
           
 groovy.lang.MetaClass getMetaClass()
           
 java.lang.String getOutputFile()
           
 java.lang.Object getProperty(java.lang.String property)
           
protected  java.lang.String getResourceBundleString(java.lang.String resourceKey)
           
protected  java.lang.String getResourceBundleString(java.lang.String resourceKey, java.lang.String defaultString)
           
protected  java.lang.String getResourceBundleString(java.lang.String resourceKey, java.lang.String defaultString, boolean logWarning)
           
protected  java.util.List getSortedRules(AnalysisContext analysisContext)
           
 java.lang.Object getWriteToStandardOut()
           
protected  void initializeDefaultResourceBundle()
           
 java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
           
protected  boolean isEnabled(Rule rule)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setOutputFile(java.lang.String value)
           
 void setProperty(java.lang.String property, java.lang.Object value)
           
 void setWriteToStandardOut(java.lang.Object value)
           
 void writeReport(AnalysisContext analysisContext, Results results)
           
abstract  void writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_MESSAGES_BUNDLE

protected static java.lang.Object BASE_MESSAGES_BUNDLE

CUSTOM_MESSAGES_BUNDLE

protected static java.lang.Object CUSTOM_MESSAGES_BUNDLE

VERSION_FILE

protected static java.lang.Object VERSION_FILE

CODENARC_URL

protected static java.lang.Object CODENARC_URL

getTimestamp

protected java.lang.Object getTimestamp

customMessagesBundleName

protected java.lang.Object customMessagesBundleName

resourceBundle

protected java.lang.Object resourceBundle

initializeResourceBundle

protected java.lang.Object initializeResourceBundle
Constructor Detail

AbstractReportWriter

public AbstractReportWriter()
Method Detail

getResourceBundleString

protected java.lang.String getResourceBundleString(java.lang.String resourceKey,
                                                   java.lang.String defaultString)

getResourceBundleString

protected java.lang.String getResourceBundleString(java.lang.String resourceKey)

getMetaClass

public groovy.lang.MetaClass getMetaClass()
Specified by:
getMetaClass in interface groovy.lang.GroovyObject

setMetaClass

public void setMetaClass(groovy.lang.MetaClass mc)
Specified by:
setMetaClass in interface groovy.lang.GroovyObject

invokeMethod

public java.lang.Object invokeMethod(java.lang.String method,
                                     java.lang.Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

public java.lang.Object getProperty(java.lang.String property)
Specified by:
getProperty in interface groovy.lang.GroovyObject

setProperty

public void setProperty(java.lang.String property,
                        java.lang.Object value)
Specified by:
setProperty in interface groovy.lang.GroovyObject

getOutputFile

public java.lang.String getOutputFile()

setOutputFile

public void setOutputFile(java.lang.String value)

getWriteToStandardOut

public java.lang.Object getWriteToStandardOut()

setWriteToStandardOut

public void setWriteToStandardOut(java.lang.Object value)

writeReport

public abstract void writeReport(java.io.Writer writer,
                                 AnalysisContext analysisContext,
                                 Results results)

writeReport

public void writeReport(AnalysisContext analysisContext,
                        Results results)
Specified by:
writeReport in interface ReportWriter

initializeDefaultResourceBundle

protected void initializeDefaultResourceBundle()

getHtmlDescriptionForRule

protected java.lang.String getHtmlDescriptionForRule(Rule rule)

getDescriptionForRule

protected java.lang.String getDescriptionForRule(Rule rule)

getResourceBundleString

protected java.lang.String getResourceBundleString(java.lang.String resourceKey,
                                                   java.lang.String defaultString,
                                                   boolean logWarning)

getFormattedTimestamp

protected java.lang.String getFormattedTimestamp()

getSortedRules

protected java.util.List getSortedRules(AnalysisContext analysisContext)

isEnabled

protected boolean isEnabled(Rule rule)

getCodeNarcVersion

protected java.lang.String getCodeNarcVersion()


Copyright © 2011. All Rights Reserved.