Package net.sourceforge.pmd.lang
Interface LanguageProcessor
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
BatchLanguageProcessor
public interface LanguageProcessor extends AutoCloseable
Stateful object managing the analysis for a given language.- Author:
- Clément Fournier
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
LanguageProcessor.AnalysisTask
Configuration of an analysis, as given tolaunchAnalysis(AnalysisTask)
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull PmdCapableLanguage
getLanguage()
The language of this processor.@NonNull LanguageVersion
getLanguageVersion()
The language version that was configured when creating this processor.@NonNull AutoCloseable
launchAnalysis(@NonNull LanguageProcessor.AnalysisTask analysisTask)
Launch the analysis based on the givenanalysis task
.@NonNull LanguageVersionHandler
services()
A collection of extension points implemented by the language.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
services
@NonNull LanguageVersionHandler services()
A collection of extension points implemented by the language.
-
launchAnalysis
@NonNull AutoCloseable launchAnalysis(@NonNull LanguageProcessor.AnalysisTask analysisTask)
Launch 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.- Parameters:
analysisTask
- Configuration of the analysis- Returns:
- A closeable - the analysis is only ended when the close method returns.
-
getLanguage
@NonNull PmdCapableLanguage getLanguage()
The language of this processor.
-
getLanguageVersion
@NonNull LanguageVersion getLanguageVersion()
The language version that was configured when creating this processor.
-
-