Package net.sourceforge.pmd.renderers
Class AbstractRenderer
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.renderers.AbstractRenderer
-
- All Implemented Interfaces:
PropertySource
,Renderer
- Direct Known Subclasses:
AbstractAccumulatingRenderer
,AbstractIncrementingRenderer
,EmptyRenderer
public abstract class AbstractRenderer extends AbstractPropertySource implements Renderer
Abstract base class forRenderer
implementations.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
description
protected java.lang.String
name
protected boolean
showSuppressedViolations
protected java.io.Writer
writer
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
-
Constructor Summary
Constructors Constructor Description AbstractRenderer(java.lang.String name, java.lang.String description)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
flush()
java.lang.String
getDescription()
Get the description of the Renderer.java.lang.String
getName()
Gets the name of the property source.java.io.Writer
getWriter()
Get the Writer for the Renderer.boolean
isShowSuppressedViolations()
Get the indicator for whether to show suppressed violations.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.-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.properties.PropertySource
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
Methods inherited from interface net.sourceforge.pmd.renderers.Renderer
defaultFileExtension, end, renderFileReport, start, startFileAnalysis
-
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from class:AbstractPropertySource
Gets the name of the property source. This is e.g. the rule name or the report name.- Specified by:
getName
in interfaceRenderer
- Specified by:
getName
in classAbstractPropertySource
- Returns:
- the name
-
setName
public void setName(java.lang.String name)
Description copied from interface:Renderer
Set the name of the Renderer.
-
getDescription
public java.lang.String getDescription()
Description copied from interface:Renderer
Get the description of the Renderer.- Specified by:
getDescription
in interfaceRenderer
- Returns:
- The description of the Renderer.
-
setDescription
public void setDescription(java.lang.String description)
Description copied from interface:Renderer
Set the description of the Renderer.- Specified by:
setDescription
in interfaceRenderer
- Parameters:
description
- The description of the Renderer.
-
isShowSuppressedViolations
public boolean isShowSuppressedViolations()
Description copied from interface:Renderer
Get the indicator for whether to show suppressed violations.- Specified by:
isShowSuppressedViolations
in interfaceRenderer
- Returns:
true
if suppressed violations should show,false
otherwise.
-
setShowSuppressedViolations
public void setShowSuppressedViolations(boolean showSuppressedViolations)
Description copied from interface:Renderer
Set the indicator for whether to show suppressed violations.- Specified by:
setShowSuppressedViolations
in interfaceRenderer
- Parameters:
showSuppressedViolations
- Whether to show suppressed violations.
-
setWriter
public void setWriter(java.io.Writer writer)
Description copied from interface:Renderer
Set the Writer for the Renderer.
-
getWriter
public java.io.Writer getWriter()
Description copied from interface:Renderer
Get the Writer for the Renderer.
-
-