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 Modifier and Type Field Description protected static StringBASE_MESSAGES_BUNDLEprotected static StringCODENARC_URLprotected static StringCUSTOM_MESSAGES_BUNDLEprotected StringcustomMessagesBundleNameprotected groovy.lang.ClosuregetTimestampprotected groovy.lang.ClosureinitializeResourceBundleprotected ResourceBundleresourceBundleprotected static StringVERSION_FILE
-
Constructor Summary
Constructors Constructor Description AbstractReportWriter()
-
Method Summary
-
-
-
Field Detail
-
BASE_MESSAGES_BUNDLE
protected static final String BASE_MESSAGES_BUNDLE
- See Also:
- Constant Field Values
-
CUSTOM_MESSAGES_BUNDLE
protected static final String CUSTOM_MESSAGES_BUNDLE
- See Also:
- Constant Field Values
-
VERSION_FILE
protected static final String VERSION_FILE
- See Also:
- Constant Field Values
-
CODENARC_URL
protected static final String CODENARC_URL
- See Also:
- Constant Field Values
-
getTimestamp
protected groovy.lang.Closure getTimestamp
-
customMessagesBundleName
protected String customMessagesBundleName
-
resourceBundle
protected ResourceBundle resourceBundle
-
initializeResourceBundle
protected groovy.lang.Closure initializeResourceBundle
-
-
Method Detail
-
getResourceBundleString
protected String getResourceBundleString(String resourceKey, String defaultString)
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject
-
invokeMethod
public Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject
-
getProperty
public Object getProperty(String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setPropertyin interfacegroovy.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:
writeReportin interfaceReportWriter
-
initializeDefaultResourceBundle
protected void initializeDefaultResourceBundle()
-
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()
-
-