|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Renderer
This is an interface for rendering a Report. When a Renderer is being invoked, the sequence of method calls is something like the following:
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.
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface net.sourceforge.pmd.PropertySource |
|---|
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues |
| Method Detail |
|---|
String 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.
IOExceptionReport
void end()
throws IOException
renderFileReport(Report).
IOException
void flush()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||