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.DialectLanguageMetadata, LanguageModuleBase.LanguageMetadata -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstruct a module instance using the given metadata. -
Method Summary
Modifier and TypeMethodDescriptionabstract CpdLexercreateCpdLexer(LanguagePropertyBundle bundle) Create a newCpdLexerfor this language, given a property bundle with configuration.Methods inherited from class net.sourceforge.pmd.lang.LanguageModuleBase
compareTo, equals, getBaseLanguageId, getDefaultVersion, getDependencies, getExtensions, getId, getName, getShortName, getVersion, getVersionNamesAndAliases, getVersions, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface net.sourceforge.pmd.lang.Language
getBaseLanguageId, getDefaultVersion, getDependencies, getExtensions, getId, getLatestVersion, getName, getShortName, getVersion, getVersionNamesAndAliases, getVersions, hasExtension, hasVersion, isDialectOf, newPropertyBundle
-
Constructor Details
-
CpdOnlyLanguageModuleBase
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 Details
-
createCpdLexer
Description copied from interface:CpdCapableLanguageCreate a newCpdLexerfor 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:
createCpdLexerin interfaceCpdCapableLanguage- Parameters:
bundle- A bundle of properties created by this instance.- Returns:
- A new language processor
-