Package net.sourceforge.pmd.lang.impl
Class SimpleLanguageModuleBase
- java.lang.Object
-
- net.sourceforge.pmd.lang.LanguageModuleBase
-
- net.sourceforge.pmd.lang.impl.SimpleLanguageModuleBase
-
- All Implemented Interfaces:
Comparable<Language>
,CpdCapableLanguage
,Language
,PmdCapableLanguage
- Direct Known Subclasses:
PlainTextLanguage
public class SimpleLanguageModuleBase extends LanguageModuleBase implements PmdCapableLanguage, CpdCapableLanguage
The simplest implementation of a language, where only aLanguageVersionHandler
needs to be implemented. A defaultCpdCapableLanguage
implementation is provided.- Author:
- Clément Fournier
- Since:
- 7.0.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.sourceforge.pmd.lang.LanguageModuleBase
LanguageModuleBase.LanguageMetadata
-
-
Constructor Summary
Constructors Modifier Constructor Description SimpleLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata, Function<LanguagePropertyBundle,LanguageVersionHandler> makeHandler)
protected
SimpleLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata, LanguageVersionHandler handler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LanguageProcessor
createProcessor(LanguagePropertyBundle bundle)
Create a newLanguageProcessor
for this language, given a property bundle with configuration.-
Methods inherited from class net.sourceforge.pmd.lang.LanguageModuleBase
compareTo, equals, getDefaultVersion, getDependencies, getExtensions, getId, getName, getShortName, getVersion, getVersionNamesAndAliases, getVersions, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface net.sourceforge.pmd.cpd.CpdCapableLanguage
createCpdLexer
-
Methods inherited from interface net.sourceforge.pmd.lang.Language
getDefaultVersion, getDependencies, getExtensions, getId, getLatestVersion, getName, getShortName, getVersion, getVersionNamesAndAliases, getVersions, hasExtension, hasVersion, newPropertyBundle
-
-
-
-
Constructor Detail
-
SimpleLanguageModuleBase
protected SimpleLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata, LanguageVersionHandler handler)
-
SimpleLanguageModuleBase
public SimpleLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata, Function<LanguagePropertyBundle,LanguageVersionHandler> makeHandler)
-
-
Method Detail
-
createProcessor
public LanguageProcessor createProcessor(LanguagePropertyBundle bundle)
Description copied from interface:PmdCapableLanguage
Create a newLanguageProcessor
for this language, given a property bundle with configuration. The bundle was created by this instance usingLanguage.newPropertyBundle()
. It can be assumed that the bundle will never be mutated anymore, and this method takes ownership of it.- Specified by:
createProcessor
in interfacePmdCapableLanguage
- Parameters:
bundle
- A bundle of properties created by this instance.- Returns:
- A new language processor
-
-