|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Language
Interface each Language implementation has to implement. It is used by the LanguageRregistry to access constants and implementation classes in order to provide support for the language.
The following are key components of a Language in PMD:
LanguageVersion
,
LanguageVersionDiscoverer
Field Summary | |
---|---|
static String |
LANGUAGE_MODULES_CLASS_NAMES_PROPERTY
|
Method Summary | |
---|---|
LanguageVersion |
getDefaultVersion()
Get the current PMD defined default LanguageVersion for this Language. |
List<String> |
getExtensions()
Get the list of file extensions associated with this Language. |
String |
getName()
Get the full name of this Language. |
Class<?> |
getRuleChainVisitorClass()
Get the RuleChainVisitor implementation class used when visiting the AST structure for this Rules for this Language. |
String |
getShortName()
Get the short name of this Language. |
String |
getTerseName()
Get the terse name of this Language. |
LanguageVersion |
getVersion(String version)
Get the LanguageVersion for the version string from this Language. |
List<LanguageVersion> |
getVersions()
Gets the list of supported LanguageVersion for this Language. |
boolean |
hasExtension(String extension)
Returns whether the given Language handles the given file extension. |
boolean |
hasVersion(String version)
|
Field Detail |
---|
static final String LANGUAGE_MODULES_CLASS_NAMES_PROPERTY
Method Detail |
---|
String getName()
String getShortName()
String getTerseName()
List<String> getExtensions()
boolean hasExtension(String extension)
extension
- A file extension.
true
if this Language handles this extension, false
otherwise.Class<?> getRuleChainVisitorClass()
RuleChainVisitor
List<LanguageVersion> getVersions()
boolean hasVersion(String version)
LanguageVersion getVersion(String version)
version
- The language version string.
null
if the
version string is not recognized.LanguageVersion getDefaultVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |