Package net.sourceforge.pmd.lang.impl
Class CpdOnlyLanguageModuleBase
- java.lang.Object
-
- net.sourceforge.pmd.lang.LanguageModuleBase
-
- net.sourceforge.pmd.lang.impl.CpdOnlyLanguageModuleBase
-
- All Implemented Interfaces:
Comparable<Language>
,CpdCapableLanguage
,Language
public abstract class CpdOnlyLanguageModuleBase extends LanguageModuleBase implements CpdCapableLanguage
Base class for language modules that only support CPD and not PMD.- 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 protected
CpdOnlyLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata)
Construct a module instance using the given metadata.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract CpdLexer
createCpdLexer(LanguagePropertyBundle bundle)
Create a newCpdLexer
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.lang.Language
getDefaultVersion, getDependencies, getExtensions, getId, getLatestVersion, getName, getShortName, getVersion, getVersionNamesAndAliases, getVersions, hasExtension, hasVersion, newPropertyBundle
-
-
-
-
Constructor Detail
-
CpdOnlyLanguageModuleBase
protected CpdOnlyLanguageModuleBase(LanguageModuleBase.LanguageMetadata metadata)
Construct a module instance using the given metadata. The metadata must be properly constructed.- Throws:
IllegalStateException
- If the metadata is invalid (eg missing extensions or name)
-
-
Method Detail
-
createCpdLexer
public abstract CpdLexer createCpdLexer(LanguagePropertyBundle bundle)
Description copied from interface:CpdCapableLanguage
Create a newCpdLexer
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:
createCpdLexer
in interfaceCpdCapableLanguage
- Parameters:
bundle
- A bundle of properties created by this instance.- Returns:
- A new language processor
-
-