PropertySource
, Renderer
CodeClimateRenderer
, CSVRenderer
, EmacsRenderer
, HTMLRenderer
, IDEAJRenderer
, TextPadRenderer
, TextRenderer
, VBHTMLRenderer
, XMLRenderer
public abstract class AbstractIncrementingRenderer extends AbstractRenderer
Renderer
implementations which can produce
output incrementally for RuleViolation
s as source files are
processed. Such Renderer
s are able to produce large reports with
significantly less working memory at any given time. Variations in the
delivery of source file reports are reflected in the output of the
Renderer
, so report output can be different between runs.
Only processing errors and suppressed violations are accumulated across all
files. These are intended to be processed in the end()
method.Modifier and Type | Field | Description |
---|---|---|
protected java.util.List<Report.ConfigurationError> |
configErrors |
Accumulated configuration errors.
|
protected java.util.List<Report.ProcessingError> |
errors |
Accumulated processing errors.
|
protected java.util.List<Report.SuppressedViolation> |
suppressed |
Accumulated suppressed violations.
|
propertyDescriptors, propertyValuesByDescriptor
description, name, showSuppressedViolations, writer
Constructor | Description |
---|---|
AbstractIncrementingRenderer(java.lang.String name,
java.lang.String description) |
Modifier and Type | Method | Description |
---|---|---|
void |
end() |
This method is at the very end of the Rendering process, after
Renderer.renderFileReport(Report) . |
void |
renderFileReport(Report report) |
Render the given file Report.
|
abstract void |
renderFileViolations(java.util.Iterator<RuleViolation> violations) |
Render a series of
RuleViolation s. |
void |
start() |
This method is called before any source files are processed.
|
void |
startFileAnalysis(DataSource dataSource) |
This method is called each time a source file is processed.
|
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
flush, getDescription, getName, getWriter, isShowSuppressedViolations, setDescription, setName, setShowSuppressedViolations, setWriter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
defaultFileExtension
protected java.util.List<Report.ProcessingError> errors
protected java.util.List<Report.ConfigurationError> configErrors
protected java.util.List<Report.SuppressedViolation> suppressed
public AbstractIncrementingRenderer(java.lang.String name, java.lang.String description)
public void start() throws java.io.IOException
Renderer
java.io.IOException
public void startFileAnalysis(DataSource dataSource)
Renderer
Renderer.start()
, but before
Renderer.renderFileReport(Report)
and Renderer.end()
.
This method may be invoked by different threads which are processing
files independently. Therefore, any non-trivial implementation of this
method needs to be thread-safe.dataSource
- The source file.public void renderFileReport(Report report) throws java.io.IOException
Renderer
Renderer.start()
and
Renderer.startFileAnalysis(DataSource)
, but before
Renderer.end()
.report
- A file Report.java.io.IOException
Report
public abstract void renderFileViolations(java.util.Iterator<RuleViolation> violations) throws java.io.IOException
RuleViolation
s.violations
- The iterator of violations to render.java.io.IOException
public void end() throws java.io.IOException
Renderer
Renderer.renderFileReport(Report)
.java.io.IOException
Copyright © 2002–2018 PMD. All rights reserved.