Package net.sourceforge.pmd.renderers
Class TextColorRenderer
- java.lang.Object
-
- net.sourceforge.pmd.properties.AbstractPropertySource
-
- net.sourceforge.pmd.renderers.AbstractRenderer
-
- net.sourceforge.pmd.renderers.AbstractAccumulatingRenderer
-
- net.sourceforge.pmd.renderers.TextColorRenderer
-
- All Implemented Interfaces:
PropertySource,Renderer
public class TextColorRenderer extends AbstractAccumulatingRenderer
A console renderer with optional color support under *nix systems.
* file: ./src/gilot/Test.java src: Test.java:12 rule: AtLeastOneConstructor msg: Each class should declare at least one constructor code: public class Test * file: ./src/gilot/log/format/LogInterpreter.java src: LogInterpreter.java:317 rule: AvoidDuplicateLiterals msg: The same String literal appears 4 times in this file; the first occurrence is on line 317 code: logger.error( "missing attribute 'app_arg' in rule '" + ((Element)element.getParent()).getAttributeValue( "name" ) + "'" ); src: LogInterpreter.java:317 rule: AvoidDuplicateLiterals msg: The same String literal appears 5 times in this file; the first occurrence is on line 317 code: logger.error( "missing attribute 'app_arg' in rule '" + ((Element)element.getParent()).getAttributeValue( "name" ) + "'" ); * warnings: 3Colorization is turned on by supplying -Dpmd.color - any value other than '0' or 'false', enables color - including an empty value (''). Nota Bene: colorization is atm only supported under *nix terminals accepting ansi escape sequences, such as xterm, rxvt et cetera.
-
-
Field Summary
Fields Modifier and Type Field Description static StringPropertyCOLORstatic StringNAME-
Fields inherited from class net.sourceforge.pmd.renderers.AbstractAccumulatingRenderer
report
-
Fields inherited from class net.sourceforge.pmd.renderers.AbstractRenderer
description, inputPathPrefixes, name, showSuppressedViolations, writer
-
Fields inherited from class net.sourceforge.pmd.properties.AbstractPropertySource
propertyDescriptors, propertyValuesByDescriptor
-
-
Constructor Summary
Constructors Constructor Description TextColorRenderer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdefaultFileExtension()Return the default filename extension to use.voidend()Subclasses should output theAbstractAccumulatingRenderer.report.protected ReadergetReader(String sourceFile)-
Methods inherited from class net.sourceforge.pmd.renderers.AbstractAccumulatingRenderer
renderFileReport, start, startFileAnalysis
-
Methods inherited from class net.sourceforge.pmd.renderers.AbstractRenderer
determineFileName, flush, getDescription, getName, getPropertySourceType, getWriter, isShowSuppressedViolations, setDescription, setName, setReportFile, setShowSuppressedViolations, setUseShortNames, 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 String NAME
- See Also:
- Constant Field Values
-
COLOR
public static final StringProperty COLOR
-
-
Method Detail
-
defaultFileExtension
public String defaultFileExtension()
Description copied from interface:RendererReturn the default filename extension to use.- Returns:
- String
-
end
public void end() throws IOExceptionDescription copied from class:AbstractAccumulatingRendererSubclasses should output theAbstractAccumulatingRenderer.report. This method is at the very end of the Rendering process, afterRenderer.renderFileReport(Report).- Specified by:
endin interfaceRenderer- Specified by:
endin classAbstractAccumulatingRenderer- Throws:
IOException
-
getReader
protected Reader getReader(String sourceFile) throws FileNotFoundException
- Throws:
FileNotFoundException
-
-