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 |
---|---|
java.lang.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() |
java.lang.String |
getDescription()
Get the description of the Renderer.
|
java.lang.String |
getName()
Get the name of the Renderer.
|
java.util.Map<java.lang.String,java.lang.String> |
getPropertyDefinitions()
Deprecated.
|
java.io.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(java.lang.String description)
Set the description of the Renderer.
|
void |
setName(java.lang.String name)
Set the name of the Renderer.
|
void |
setShowSuppressedViolations(boolean showSuppressedViolations)
Set the indicator for whether to show suppressed violations.
|
void |
setWriter(java.io.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, usesDefaultValues
java.lang.String getName()
void setName(java.lang.String name)
name
- The name of the Renderer.java.lang.String getDescription()
java.lang.String defaultFileExtension()
void setDescription(java.lang.String description)
description
- The description of the Renderer.@Deprecated java.util.Map<java.lang.String,java.lang.String> getPropertyDefinitions()
boolean isShowSuppressedViolations()
true
if suppressed violations should show, false
otherwise.void setShowSuppressedViolations(boolean showSuppressedViolations)
showSuppressedViolations
- Whether to show suppressed violations.java.io.Writer getWriter()
void setWriter(java.io.Writer writer)
writer
- The Writer.void start() throws java.io.IOException
java.io.IOException
void 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 java.io.IOException
start()
and
startFileAnalysis(DataSource)
, but before end()
.report
- A file Report.java.io.IOException
Report
void end() throws java.io.IOException
renderFileReport(Report)
.java.io.IOException
void flush() throws java.io.IOException
java.io.IOException
Copyright © 2002-2014 InfoEther. All Rights Reserved.