String getName()
Returns the full name of this Language. This is generally the name of this language without the use of acronyms, but possibly some capital letters, eg "Java"
. It's suitable for displaying in a GUI.
String getShortName()
Returns the short name of this language. This is the commonly used short form of this language's name, perhaps an acronym, but possibly with special characters.
String getTerseName()
Returns the terse name of this language. This is a short, alphanumeric, lowercase name, eg "java"
. It's used to identify the language in the ruleset XML, and is also in the package name of the language module.
default String getId()
Returns the ID of this language. This is a short, alphanumeric, lowercase name, eg "java"
. It's used to identify the language in the ruleset XML, and is also in the package name of the language module.
List<String> getExtensions()
Returns the list of file extensions associated with this language. This list is unmodifiable. Extensions do not have a '.' prefix.
default boolean hasExtension(String extensionWithoutDot)
Returns whether this language handles the given file extension. The comparison is done ignoring case.
extensionWithoutDot
- A file extension (without '.' prefix)
true
if this language handles the extension, false
otherwise.
List<LanguageVersion> getVersions()
Returns an ordered list of supported versions for this language.
Set<String> getVersionNamesAndAliases()
Returns a complete set of supported version names for this language including all aliases.
default boolean hasVersion(String version)
Returns true if a language version with the given
version stringis registered. Then,
getVersion
will return a non-null value.
version
- A version string
default LanguageVersion getVersion(String version)
Returns the language version with the given
version string. Returns null if no such version exists.
version
- A language version string.
null
if the version string is not recognized.
LanguageVersion getDefaultVersion()
Returns the default language version for this language. This is an arbitrary choice made by the PMD product, and can change between PMD releases. Every language has a default version.
default LanguagePropertyBundle newPropertyBundle()
Creates a new bundle of properties that will serve to configure the
LanguageProcessor
for this language. The returned bundle must have all relevant properties already declared.
LanguageProcessor createProcessor(LanguagePropertyBundle bundle)
Create a new
LanguageProcessor
for this language, given a property bundle with configuration. The bundle was created by this instance using
newPropertyBundle()
. It can be assumed that the bundle will never be mutated anymore, and this method takes ownership of it.
bundle
- A bundle of properties created by this instance.
Set<String> getDependencies()
Returns a set of the IDs of languages that this language instance depends on. Whenever this language is loaded into a
LanguageProcessorRegistry
, those dependencies need to be loaded as well.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4