public enum Language extends Enum<Language>
The following are key components of a Language in PMD:
LanguageVersion
,
LanguageVersionDiscoverer
Enum Constant and Description |
---|
CPP |
ECMASCRIPT |
FORTRAN |
JAVA |
JSP |
PHP |
RUBY |
XML |
XSL |
Modifier and Type | Method and Description |
---|---|
static String |
commaSeparatedTerseNames(List<Language> languages)
Return a comma separated list of Language terse names.
|
static List<Language> |
findByExtension(String extension)
A utility method to find the Languages which are associated with
the given file extension.
|
static Language |
findByTerseName(String terseName)
A utility method to find the Language associated with the given
terse name, whatever the case is.
|
static List<Language> |
findWithRuleSupport()
A utility method to find the Languages which have Rule support.
|
static Language |
getDefaultLanguage()
Return the default language for PMD.
|
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.
|
String |
toString()
A friendly String form of the Language.
|
static Language |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Language[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Language CPP
public static final Language FORTRAN
public static final Language ECMASCRIPT
public static final Language JAVA
public static final Language JSP
public static final Language PHP
public static final Language RUBY
public static final Language XSL
public static final Language XML
public static Language[] values()
for (Language c : Language.values()) System.out.println(c);
public static Language valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic String getName()
public String getShortName()
public String getTerseName()
public List<String> getExtensions()
public boolean hasExtension(String extension)
extension
- A file extension.true
if this Language handles this extension, false
otherwise.public Class<?> getRuleChainVisitorClass()
RuleChainVisitor
public List<LanguageVersion> getVersions()
public LanguageVersion getDefaultVersion()
public LanguageVersion getVersion(String version)
version
- The language version string.null
if the
version string is not recognized.public String toString()
public static List<Language> findWithRuleSupport()
public static List<Language> findByExtension(String extension)
extension
- The file extension.public static Language findByTerseName(String terseName)
terseName
- The Language terse name.null
if there is
no Language with this terse name.public static String commaSeparatedTerseNames(List<Language> languages)
languages
- The languages.public static Language getDefaultLanguage()
Copyright © 2002-2013 InfoEther. All Rights Reserved.