Package net.sourceforge.pmd.lang.impl
Class BatchLanguageProcessor<P extends LanguagePropertyBundle>
java.lang.Object
net.sourceforge.pmd.lang.impl.BatchLanguageProcessor<P>
- All Implemented Interfaces:
AutoCloseable,LanguageProcessor
public abstract class BatchLanguageProcessor<P extends LanguagePropertyBundle>
extends Object
implements LanguageProcessor
A base class for language processors. It processes all files of the
corresponding language as a single batch. It can operate in parallel
or sequentially depending on the number of threads passed in the
LanguageProcessor.AnalysisTask.- Author:
- Clément Fournier
- Since:
- 7.0.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.sourceforge.pmd.lang.LanguageProcessor
LanguageProcessor.AnalysisTask -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()final @NonNull PmdCapableLanguageThe language of this processor.@NonNull LanguageVersionThe language version that was configured when creating this processor.@NonNull AutoCloseablelaunchAnalysis(@NonNull LanguageProcessor.AnalysisTask task) Launch the analysis based on the givenanalysis task.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.sourceforge.pmd.lang.LanguageProcessor
services
-
Constructor Details
-
BatchLanguageProcessor
-
-
Method Details
-
getProperties
-
getLanguageVersion
Description copied from interface:LanguageProcessorThe language version that was configured when creating this processor.- Specified by:
getLanguageVersionin interfaceLanguageProcessor
-
getLanguage
Description copied from interface:LanguageProcessorThe language of this processor.- Specified by:
getLanguagein interfaceLanguageProcessor
-
launchAnalysis
Description copied from interface:LanguageProcessorLaunch the analysis based on the givenanalysis task. The analysis only has to completion after the return value has been closed, as this method may launch background threads to perform the analysis and return without blocking. In that case the returned Closeable will join the analysis threads when being closed.- Specified by:
launchAnalysisin interfaceLanguageProcessor- Parameters:
task- Configuration of the analysis- Returns:
- A closeable - the analysis is only ended when the close method returns.
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-