Package net.sourceforge.pmd.renderers
Class HTMLRenderer
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.renderers.AbstractRenderer
-
- net.sourceforge.pmd.renderers.AbstractIncrementingRenderer
-
- net.sourceforge.pmd.renderers.HTMLRenderer
-
- All Implemented Interfaces:
PropertySource
,Renderer
public class HTMLRenderer extends AbstractIncrementingRenderer
Renderer to basic HTML format. FIXME: this class should just work with the XMLRenderer and then apply an XSLT transformation + stylesheet. No need to hard-code HTML markup here.
-
-
Field Summary
Fields Modifier and Type Field Description static StringProperty
LINE_PREFIX
static StringProperty
LINK_PREFIX
static java.lang.String
NAME
-
Fields inherited from class net.sourceforge.pmd.renderers.AbstractIncrementingRenderer
configErrors, errors, suppressed
-
Fields inherited from class net.sourceforge.pmd.renderers.AbstractRenderer
description, name, showSuppressedViolations, writer
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
-
Constructor Summary
Constructors Constructor Description HTMLRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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, afterRenderer.renderFileReport(Report)
.void
renderBody(java.io.Writer writer, Report report)
Write the body of the main body of the HTML content.void
renderFileViolations(java.util.Iterator<RuleViolation> violations)
Render a series ofRuleViolation
s.void
start()
This method is called before any source files are processed.-
Methods inherited from class net.sourceforge.pmd.renderers.AbstractIncrementingRenderer
renderFileReport, startFileAnalysis
-
Methods inherited from class net.sourceforge.pmd.renderers.AbstractRenderer
flush, getDescription, getName, getPropertySourceType, getWriter, isShowSuppressedViolations, setDescription, setName, setShowSuppressedViolations, setWriter
-
Methods inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, 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, getOverriddenPropertiesByPropertyDescriptor, getOverriddenPropertyDescriptors, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, isPropertyOverridden, setProperty, setProperty, useDefaultValueFor, usesDefaultValues
-
-
-
-
Field Detail
-
NAME
public static final java.lang.String NAME
- See Also:
- Constant Field Values
-
LINE_PREFIX
public static final StringProperty LINE_PREFIX
-
LINK_PREFIX
public static final StringProperty LINK_PREFIX
-
-
Method Detail
-
defaultFileExtension
public java.lang.String defaultFileExtension()
Description copied from interface:Renderer
Return the default filename extension to use.- Returns:
- String
-
renderBody
public void renderBody(java.io.Writer writer, Report report) throws java.io.IOException
Write the body of the main body of the HTML content.- Parameters:
writer
-report
-- Throws:
java.io.IOException
-
start
public void start() throws java.io.IOException
Description copied from interface:Renderer
This method is called before any source files are processed. The Renderer will have been fully initialized by the time this method is called, so the Writer and other state will be available.- Specified by:
start
in interfaceRenderer
- Overrides:
start
in classAbstractIncrementingRenderer
- Throws:
java.io.IOException
-
renderFileViolations
public void renderFileViolations(java.util.Iterator<RuleViolation> violations) throws java.io.IOException
Description copied from class:AbstractIncrementingRenderer
Render a series ofRuleViolation
s.- Specified by:
renderFileViolations
in classAbstractIncrementingRenderer
- Parameters:
violations
- The iterator of violations to render.- Throws:
java.io.IOException
-
end
public void end() throws java.io.IOException
Description copied from interface:Renderer
This method is at the very end of the Rendering process, afterRenderer.renderFileReport(Report)
.- Specified by:
end
in interfaceRenderer
- Overrides:
end
in classAbstractIncrementingRenderer
- Throws:
java.io.IOException
-
-