Package org.codenarc.report
Class TextReportWriter
- java.lang.Object
-
- org.codenarc.report.AbstractReportWriter
-
- org.codenarc.report.TextReportWriter
-
- All Implemented Interfaces:
groovy.lang.GroovyObject
,ReportWriter
- Direct Known Subclasses:
IdeTextReportWriter
public class TextReportWriter extends AbstractReportWriter
-
-
Field Summary
-
Fields inherited from class org.codenarc.report.AbstractReportWriter
BASE_MESSAGES_BUNDLE, CODENARC_URL, CUSTOM_MESSAGES_BUNDLE, customMessagesBundleName, getTimestamp, initializeResourceBundle, resourceBundle, VERSION_FILE
-
-
Constructor Summary
Constructors Constructor Description TextReportWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDefaultOutputFile()
int
getMaxPriority()
groovy.lang.MetaClass
getMetaClass()
java.lang.Object
getProperty(java.lang.String property)
java.lang.String
getTitle()
protected java.lang.String
getViolationLocationString(Violation violation, java.lang.String path)
java.lang.Object
invokeMethod(java.lang.String method, java.lang.Object arguments)
void
setDefaultOutputFile(java.lang.String value)
void
setMaxPriority(int value)
void
setMetaClass(groovy.lang.MetaClass mc)
void
setProperty(java.lang.String property, java.lang.Object value)
void
setTitle(java.lang.String value)
protected void
writeFileViolations(java.io.Writer writer, FileResults results)
protected void
writeFooter(java.io.Writer writer)
protected void
writePackageViolations(java.io.Writer writer, Results results)
void
writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results)
protected void
writeSummary(java.io.Writer writer, Results results)
protected void
writeTitle(java.io.Writer writer)
protected void
writeViolation(java.io.Writer writer, Violation violation, java.lang.String path)
-
Methods inherited from class org.codenarc.report.AbstractReportWriter
getCodeNarcVersion, getDescriptionForRule, getFormattedTimestamp, getHtmlDescriptionForRule, getOutputFile, getResourceBundleString, getResourceBundleString, getResourceBundleString, getSortedRules, getWriteToStandardOut, initializeDefaultResourceBundle, isEnabled, setOutputFile, setWriteToStandardOut, writeReport
-
-
-
-
Method Detail
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClass
in interfacegroovy.lang.GroovyObject
- Overrides:
getMetaClass
in classAbstractReportWriter
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClass
in interfacegroovy.lang.GroovyObject
- Overrides:
setMetaClass
in classAbstractReportWriter
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
- Overrides:
invokeMethod
in classAbstractReportWriter
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
- Overrides:
getProperty
in classAbstractReportWriter
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
- Overrides:
setProperty
in classAbstractReportWriter
-
getTitle
public java.lang.String getTitle()
-
setTitle
public void setTitle(java.lang.String value)
-
getDefaultOutputFile
public java.lang.String getDefaultOutputFile()
-
setDefaultOutputFile
public void setDefaultOutputFile(java.lang.String value)
-
getMaxPriority
public int getMaxPriority()
-
setMaxPriority
public void setMaxPriority(int value)
-
writeReport
public void writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results)
- Specified by:
writeReport
in classAbstractReportWriter
-
writeTitle
protected void writeTitle(java.io.Writer writer)
-
writeSummary
protected void writeSummary(java.io.Writer writer, Results results)
-
writePackageViolations
protected void writePackageViolations(java.io.Writer writer, Results results)
-
writeFileViolations
protected void writeFileViolations(java.io.Writer writer, FileResults results)
-
writeViolation
protected void writeViolation(java.io.Writer writer, Violation violation, java.lang.String path)
-
getViolationLocationString
protected java.lang.String getViolationLocationString(Violation violation, java.lang.String path)
-
writeFooter
protected void writeFooter(java.io.Writer writer)
-
-