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
-
-
Field Summary
Fields Modifier and Type Field Description protected static 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 StringbuildTitle()protected StringformatSourceLine(String sourceLine)protected StringformatSourceLine(String sourceLine, int startColumn)protected StringgetCssFile()booleangetIncludeRuleDescriptions()intgetMaxPriority()groovy.lang.MetaClassgetMetaClass()ObjectgetProperty(String property)StringgetTitle()ObjectinvokeMethod(String method, Object arguments)protected booleanisDirectoryContainingFiles(Results results)protected booleanisDirectoryContainingFilesWithViolations(Results results)booleanisIncludeRuleDescriptions()voidsetIncludeRuleDescriptions(boolean value)voidsetMaxPriority(int value)voidsetMetaClass(groovy.lang.MetaClass mc)voidsetProperty(String property, Object value)voidsetTitle(String value)voidwriteReport(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 String CSS_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
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 Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethodin interfacegroovy.lang.GroovyObject- Overrides:
invokeMethodin classAbstractReportWriter
-
getProperty
public Object getProperty(String property)
- Specified by:
getPropertyin interfacegroovy.lang.GroovyObject- Overrides:
getPropertyin classAbstractReportWriter
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setPropertyin interfacegroovy.lang.GroovyObject- Overrides:
setPropertyin classAbstractReportWriter
-
getTitle
public String getTitle()
-
setTitle
public void setTitle(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 String getCssFile()
-
buildBodySection
protected abstract groovy.lang.Closure buildBodySection(AnalysisContext analysisContext, Results results)
-
writeReport
public void writeReport(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)
-
isDirectoryContainingFilesWithViolations
protected boolean isDirectoryContainingFilesWithViolations(Results results)
-
isDirectoryContainingFiles
protected boolean isDirectoryContainingFiles(Results results)
-
buildTitle
protected String buildTitle()
-
-