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 Object
implements ReportWriter, groovy.lang.GroovyObject


Field Summary
protected static Object BASE_MESSAGES_BUNDLE
           
protected static Object CODENARC_URL
           
protected static Object CUSTOM_MESSAGES_BUNDLE
           
protected  Object customMessagesBundleName
           
protected  Object getTimestamp
           
protected  Object initializeResourceBundle
           
protected  Object resourceBundle
           
protected static Object VERSION_FILE
           
 
Constructor Summary
AbstractReportWriter()
           
 
Method Summary
protected  String getCodeNarcVersion()
           
protected  String getDescriptionForRule(Rule rule)
           
protected  String getFormattedTimestamp()
           
protected  String getHtmlDescriptionForRule(Rule rule)
           
 groovy.lang.MetaClass getMetaClass()
           
 String getOutputFile()
           
 Object getProperty(String property)
           
protected  String getResourceBundleString(String resourceKey)
           
protected  String getResourceBundleString(String resourceKey, String defaultString)
           
protected  String getResourceBundleString(String resourceKey, String defaultString, boolean logWarning)
           
protected  List getSortedRules(AnalysisContext analysisContext)
           
 Object getWriteToStandardOut()
           
protected  void initializeDefaultResourceBundle()
           
 Object invokeMethod(String method, Object arguments)
           
protected  boolean isEnabled(Rule rule)
           
 void setMetaClass(groovy.lang.MetaClass mc)
           
 void setOutputFile(String value)
           
 void setProperty(String property, Object value)
           
 void setWriteToStandardOut(Object value)
           
 void writeReport(AnalysisContext analysisContext, Results results)
           
abstract  void writeReport(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 Object BASE_MESSAGES_BUNDLE

CUSTOM_MESSAGES_BUNDLE

protected static Object CUSTOM_MESSAGES_BUNDLE

VERSION_FILE

protected static Object VERSION_FILE

CODENARC_URL

protected static Object CODENARC_URL

getTimestamp

protected Object getTimestamp

customMessagesBundleName

protected Object customMessagesBundleName

resourceBundle

protected Object resourceBundle

initializeResourceBundle

protected Object initializeResourceBundle
Constructor Detail

AbstractReportWriter

public AbstractReportWriter()
Method Detail

getResourceBundleString

protected String getResourceBundleString(String resourceKey,
                                         String defaultString)

getResourceBundleString

protected String getResourceBundleString(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 Object invokeMethod(String method,
                           Object arguments)
Specified by:
invokeMethod in interface groovy.lang.GroovyObject

getProperty

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

setProperty

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

getOutputFile

public String getOutputFile()

setOutputFile

public void setOutputFile(String value)

getWriteToStandardOut

public Object getWriteToStandardOut()

setWriteToStandardOut

public void setWriteToStandardOut(Object value)

writeReport

public abstract void writeReport(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 String getHtmlDescriptionForRule(Rule rule)

getDescriptionForRule

protected String getDescriptionForRule(Rule rule)

getResourceBundleString

protected String getResourceBundleString(String resourceKey,
                                         String defaultString,
                                         boolean logWarning)

getFormattedTimestamp

protected String getFormattedTimestamp()

getSortedRules

protected List getSortedRules(AnalysisContext analysisContext)

isEnabled

protected boolean isEnabled(Rule rule)

getCodeNarcVersion

protected String getCodeNarcVersion()


Copyright © 2012. All Rights Reserved.