public interface Renderer extends PropertySource
setShowSuppressedViolations(boolean)setWriter(Writer)start()startFileAnalysis(DataSource) for each source file processedrenderFileReport(Report) for each Report instanceend()
An implementation of the Renderer interface is expected to have a default constructor.
Properties should be defined using the PropertySource.definePropertyDescriptor(net.sourceforge.pmd.PropertyDescriptor)
method. After the instance is created, the property values are set. This means, you won't
have access to property values in your constructor.
| Modifier and Type | Method and Description |
|---|---|
String |
defaultFileExtension()
Return the default filename extension to use.
|
void |
end()
This method is at the very end of the Rendering process, after
renderFileReport(Report). |
void |
flush() |
String |
getDescription()
Get the description of the Renderer.
|
String |
getName()
Get the name of the Renderer.
|
Map<String,String> |
getPropertyDefinitions()
Deprecated.
|
Writer |
getWriter()
Get the Writer for the Renderer.
|
boolean |
isShowSuppressedViolations()
Get the indicator for whether to show suppressed violations.
|
void |
renderFileReport(Report report)
Render the given file Report.
|
void |
setDescription(String description)
Set the description of the Renderer.
|
void |
setName(String name)
Set the name of the Renderer.
|
void |
setShowSuppressedViolations(boolean showSuppressedViolations)
Set the indicator for whether to show suppressed violations.
|
void |
setWriter(Writer writer)
Set the Writer for the Renderer.
|
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.
|
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValuesString getName()
void setName(String name)
name - The name of the Renderer.String getDescription()
String defaultFileExtension()
void setDescription(String description)
description - The description of the Renderer.@Deprecated Map<String,String> getPropertyDefinitions()
boolean isShowSuppressedViolations()
true if suppressed violations should show, false otherwise.void setShowSuppressedViolations(boolean showSuppressedViolations)
showSuppressedViolations - Whether to show suppressed violations.Writer getWriter()
void setWriter(Writer writer)
writer - The Writer.void start()
throws IOException
IOExceptionvoid startFileAnalysis(DataSource dataSource)
start(), but before
renderFileReport(Report) and 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.void renderFileReport(Report report) throws IOException
start() and
startFileAnalysis(DataSource), but before end().report - A file Report.IOExceptionReportvoid end()
throws IOException
renderFileReport(Report).IOExceptionvoid flush()
throws IOException
IOExceptionCopyright © 2002-2014 InfoEther. All Rights Reserved.