Package net.sourceforge.pmd.reporting
Class GlobalAnalysisListener.ViolationCounterListener
java.lang.Object
net.sourceforge.pmd.util.BaseResultProducingCloseable<Integer>
net.sourceforge.pmd.reporting.GlobalAnalysisListener.ViolationCounterListener
- All Implemented Interfaces:
AutoCloseable,GlobalAnalysisListener
- Enclosing interface:
GlobalAnalysisListener
public static final class GlobalAnalysisListener.ViolationCounterListener
extends BaseResultProducingCloseable<Integer>
implements GlobalAnalysisListener
A listener that just counts recorded violations. The result is
available after the listener is closed (
BaseResultProducingCloseable.getResult()).-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sourceforge.pmd.reporting.GlobalAnalysisListener
GlobalAnalysisListener.ViolationCounterListener -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IntegerProduce the final result.startFileAnalysis(TextFile file) Returns a file listener that will handle events occurring during the analysis of the given file.Methods inherited from class net.sourceforge.pmd.util.BaseResultProducingCloseable
close, closeImpl, ensureOpen, getResult, usingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sourceforge.pmd.reporting.GlobalAnalysisListener
close, initializer, onConfigError
-
Constructor Details
-
ViolationCounterListener
public ViolationCounterListener()
-
-
Method Details
-
getResultImpl
Description copied from class:BaseResultProducingCloseableProduce the final result.- Specified by:
getResultImplin classBaseResultProducingCloseable<Integer>
-
startFileAnalysis
Description copied from interface:GlobalAnalysisListenerReturns a file listener that will handle events occurring during the analysis of the given file. The new listener may receive events as soon as this method returns. The analysis stops when theFileAnalysisListener.close()method is called.- Specified by:
startFileAnalysisin interfaceGlobalAnalysisListener- Parameters:
file- File to be processed- Returns:
- A new listener
-