Package org.codenarc.report
Class AbstractHtmlReportWriter
- java.lang.Object
-
- org.codenarc.report.AbstractReportWriter
-
- org.codenarc.report.AbstractHtmlReportWriter
-
- All Implemented Interfaces:
groovy.lang.GroovyObject,ReportWriter
- Direct Known Subclasses:
HtmlReportWriter,SortableHtmlReportWriter
public abstract class AbstractHtmlReportWriter extends AbstractReportWriter implements groovy.lang.GroovyObject
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCSS_FILEprotected static intMAX_SOURCE_LINE_LENGTHprotected static intSOURCE_LINE_LAST_SEGMENT_LENGTH-
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 AbstractHtmlReportWriter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract groovy.lang.ClosurebuildBodySection(AnalysisContext analysisContext, Results results)protected groovy.lang.ClosurebuildCSS()protected groovy.lang.ClosurebuildHeaderSection()protected groovy.lang.ClosurebuildLogo()protected groovy.lang.ClosurebuildReportMetadata()protected groovy.lang.ClosurebuildRuleDescriptions(AnalysisContext analysisContext)protected groovy.lang.ClosurebuildScript()protected java.lang.StringbuildTitle()protected java.lang.StringformatSourceLine(java.lang.String sourceLine)protected java.lang.StringformatSourceLine(java.lang.String sourceLine, int startColumn)protected java.lang.StringgetCssFile()booleangetIncludeRuleDescriptions()intgetMaxPriority()groovy.lang.MetaClassgetMetaClass()java.lang.ObjectgetProperty(java.lang.String property)java.lang.StringgetTitle()java.lang.ObjectinvokeMethod(java.lang.String method, java.lang.Object arguments)protected booleanisDirectoryContainingFiles(Results results)protected booleanisDirectoryContainingFilesWithViolations(Results results)booleanisIncludeRuleDescriptions()voidsetIncludeRuleDescriptions(boolean value)voidsetMaxPriority(int value)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(java.lang.String property, java.lang.Object value)voidsetTitle(java.lang.String value)voidwriteReport(java.io.Writer writer, AnalysisContext analysisContext, Results results)-
Methods inherited from class org.codenarc.report.AbstractReportWriter
getCodeNarcVersion, getDescriptionForRule, getFormattedTimestamp, getHtmlDescriptionForRule, getOutputFile, getResourceBundleString, getResourceBundleString, getResourceBundleString, getSortedRules, getWriteToStandardOut, initializeDefaultResourceBundle, isEnabled, setOutputFile, setWriteToStandardOut, writeReport
-
-
-
-
Field Detail
-
MAX_SOURCE_LINE_LENGTH
protected static final int MAX_SOURCE_LINE_LENGTH
- See Also:
- Constant Field Values
-
SOURCE_LINE_LAST_SEGMENT_LENGTH
protected static final int SOURCE_LINE_LAST_SEGMENT_LENGTH
- See Also:
- Constant Field Values
-
CSS_FILE
protected static final java.lang.String CSS_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
formatSourceLine
protected java.lang.String formatSourceLine(java.lang.String sourceLine)
-
getMetaClass
public groovy.lang.MetaClass getMetaClass()
- Specified by:
getMetaClassin interfacegroovy.lang.GroovyObject- Overrides:
getMetaClassin classAbstractReportWriter
-
setMetaClass
public void setMetaClass(groovy.lang.MetaClass mc)
- Specified by:
setMetaClassin interfacegroovy.lang.GroovyObject- Overrides:
setMetaClassin classAbstractReportWriter
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String method, java.lang.Object arguments)- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject- Overrides:
invokeMethodin classAbstractReportWriter
-
getProperty
public java.lang.Object getProperty(java.lang.String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject- Overrides:
getPropertyin classAbstractReportWriter
-
setProperty
public void setProperty(java.lang.String property, java.lang.Object value)- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject- Overrides:
setPropertyin classAbstractReportWriter
-
getTitle
public java.lang.String getTitle()
-
setTitle
public void setTitle(java.lang.String value)
-
getIncludeRuleDescriptions
public boolean getIncludeRuleDescriptions()
-
isIncludeRuleDescriptions
public boolean isIncludeRuleDescriptions()
-
setIncludeRuleDescriptions
public void setIncludeRuleDescriptions(boolean value)
-
getMaxPriority
public int getMaxPriority()
-
setMaxPriority
public void setMaxPriority(int value)
-
getCssFile
protected java.lang.String getCssFile()
-
buildBodySection
protected abstract groovy.lang.Closure buildBodySection(AnalysisContext analysisContext, Results results)
-
writeReport
public void writeReport(java.io.Writer writer, AnalysisContext analysisContext, Results results)- Specified by:
writeReportin classAbstractReportWriter
-
buildCSS
protected groovy.lang.Closure buildCSS()
-
buildScript
protected groovy.lang.Closure buildScript()
-
buildHeaderSection
protected groovy.lang.Closure buildHeaderSection()
-
buildReportMetadata
protected groovy.lang.Closure buildReportMetadata()
-
buildLogo
protected groovy.lang.Closure buildLogo()
-
buildRuleDescriptions
protected groovy.lang.Closure buildRuleDescriptions(AnalysisContext analysisContext)
-
formatSourceLine
protected java.lang.String formatSourceLine(java.lang.String sourceLine, int startColumn)
-
isDirectoryContainingFilesWithViolations
protected boolean isDirectoryContainingFilesWithViolations(Results results)
-
isDirectoryContainingFiles
protected boolean isDirectoryContainingFiles(Results results)
-
buildTitle
protected java.lang.String buildTitle()
-
-