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 String
CSS_FILE
protected static int
MAX_SOURCE_LINE_LENGTH
protected static int
SOURCE_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.Closure
buildBodySection(AnalysisContext analysisContext, Results results)
protected groovy.lang.Closure
buildCSS()
protected groovy.lang.Closure
buildHeaderSection()
protected groovy.lang.Closure
buildLogo()
protected groovy.lang.Closure
buildReportMetadata()
protected groovy.lang.Closure
buildRuleDescriptions(AnalysisContext analysisContext)
protected groovy.lang.Closure
buildScript()
protected String
buildTitle()
protected String
formatSourceLine(String sourceLine)
protected String
formatSourceLine(String sourceLine, int startColumn)
protected String
getCssFile()
boolean
getIncludeRuleDescriptions()
int
getMaxPriority()
groovy.lang.MetaClass
getMetaClass()
Object
getProperty(String property)
String
getTitle()
Object
invokeMethod(String method, Object arguments)
protected boolean
isDirectoryContainingFiles(Results results)
protected boolean
isDirectoryContainingFilesWithViolations(Results results)
boolean
isIncludeRuleDescriptions()
void
setIncludeRuleDescriptions(boolean value)
void
setMaxPriority(int value)
void
setMetaClass(groovy.lang.MetaClass mc)
void
setProperty(String property, Object value)
void
setTitle(String value)
void
writeReport(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:
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 Object invokeMethod(String method, Object arguments)
- Specified by:
invokeMethod
in interfacegroovy.lang.GroovyObject
- Overrides:
invokeMethod
in classAbstractReportWriter
-
getProperty
public Object getProperty(String property)
- Specified by:
getProperty
in interfacegroovy.lang.GroovyObject
- Overrides:
getProperty
in classAbstractReportWriter
-
setProperty
public void setProperty(String property, Object value)
- Specified by:
setProperty
in interfacegroovy.lang.GroovyObject
- Overrides:
setProperty
in 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:
writeReport
in 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()
-
-