Package org.codenarc.report
Class AbstractReportWriter
java.lang.Object
org.codenarc.report.AbstractReportWriter
- All Implemented Interfaces:
groovy.lang.GroovyObject
,ReportWriter
- Direct Known Subclasses:
AbstractHtmlReportWriter
,BaselineXmlReportWriter
,TextReportWriter
,XmlReportWriter
public abstract class AbstractReportWriter
extends Object
implements ReportWriter, groovy.lang.GroovyObject
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
protected String
getDescriptionForRule
(Rule rule) protected String
protected String
groovy.lang.MetaClass
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) protected void
invokeMethod
(String method, Object arguments) protected boolean
void
setMetaClass
(groovy.lang.MetaClass mc) void
setOutputFile
(String value) void
setProperty
(String property, Object value) void
setWriteToStandardOut
(Object value) abstract void
writeReport
(Writer writer, AnalysisContext analysisContext, Results results) void
writeReport
(AnalysisContext analysisContext, Results results)
-
Field Details
-
BASE_MESSAGES_BUNDLE
- See Also:
-
CUSTOM_MESSAGES_BUNDLE
- See Also:
-
VERSION_FILE
- See Also:
-
CODENARC_URL
- See Also:
-
getTimestamp
protected groovy.lang.Closure getTimestamp -
customMessagesBundleName
-
resourceBundle
-
initializeResourceBundle
protected groovy.lang.Closure initializeResourceBundle
-
-
Constructor Details
-
AbstractReportWriter
public AbstractReportWriter()
-
-
Method Details
-
getResourceBundleString
-
getResourceBundleString
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc) - Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
-
invokeMethod
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
-
getProperty
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
-
setProperty
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
-
getOutputFile
-
setOutputFile
-
getWriteToStandardOut
-
setWriteToStandardOut
-
writeReport
-
writeReport
- Specified by:
writeReport
in interfaceReportWriter
-
initializeDefaultResourceBundle
protected void initializeDefaultResourceBundle() -
getHtmlDescriptionForRule
-
getDescriptionForRule
-
getResourceBundleString
-
getFormattedTimestamp
-
getSortedRules
-
isEnabled
-
getCodeNarcVersion
-