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>
,Language
- Direct Known Subclasses:
PlainTextLanguage
public class SimpleLanguageModuleBase extends LanguageModuleBase
The simplest implementation of a language, where only aLanguageVersionHandler
needs to be implemented.- Since:
- 7.0.0
- Author:
- Clément Fournier
-
-
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, getName, getShortName, getTerseName, getVersion, getVersionNamesAndAliases, getVersions, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.Language
getId, 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:Language
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.- Parameters:
bundle
- A bundle of properties created by this instance.- Returns:
- A new language processor
-
-