java.lang.Object
org.bzdev.scripting.Scripting
Provide information about the scripting environment.
This class provides methods to conveniently look up
the official scripting language name, various aliases
for those names, and the corresponding file-name
extensions (without the '.'). Sets of names and extensions
are also provided.
The names are determined when the class is loaded and initialized.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAliasesByAlias(String alias) Get a set of aliases for a scripting language given one of its aliases.getAliasesByExtension(String extension) Get a set of aliases for a scripting language with a specified file-name extension.Get a set of aliases for a given language name.Get a set of the aliases for the language names for each scripting language supported on the system.getExtensionsByAlias(String alias) Get a set of file-name extensions for a given language-name alias.getExtensionsByExtension(String extension) Get a set of file-name extensions given one extension.Get a set of file-name extensions for a given language name.Get a set of all the file-name extensions used by scripting languages.static StringgetLanguageNameByAlias(String alias) Get the scripting language name given an aliasstatic StringgetLanguageNameByExtension(String extension) Get the scripting language name given a file-name extensionGet a set of the language names for the scripting languages supported on the system.static booleansupportsLanguage(String languageName) Determine if a language is supported given the language name.
-
Constructor Details
-
Scripting
public Scripting()
-
-
Method Details
-
getLanguageNameSet
Get a set of the language names for the scripting languages supported on the system. The set returned cannot be modified.- Returns:
- the set of language names
-
getExtensionSet
Get a set of all the file-name extensions used by scripting languages. The set returned cannot be modified.- Returns:
- the set of file-name extensions
-
getAliasSet
Get a set of the aliases for the language names for each scripting language supported on the system. The set returned cannot be modified.- Returns:
- the set of aliases
-
getExtensionsByLanguageName
Get a set of file-name extensions for a given language name. The set returned cannot be modified.- Parameters:
name- the language name- Returns:
- a set of file-name extensions
-
getExtensionsByExtension
Get a set of file-name extensions given one extension. The set returned cannot be modified.- Parameters:
extension- a file name extension for a scripting language- Returns:
- a set of file-name extensions
-
getExtensionsByAlias
Get a set of file-name extensions for a given language-name alias. The set returned cannot be modified.- Parameters:
alias- the language-name alias- Returns:
- a set of file-name extensions
-
getAliasesByLanguageName
Get a set of aliases for a given language name. The set returned cannot be modified.- Parameters:
name- the language name- Returns:
- a set of aliases for the specified language
-
getAliasesByExtension
Get a set of aliases for a scripting language with a specified file-name extension. The set returned cannot be modified.- Parameters:
extension- the file name extension- Returns:
- a set of aliases for the specified language
-
getAliasesByAlias
Get a set of aliases for a scripting language given one of its aliases. The set returned cannot be modified.- Parameters:
alias- an alias- Returns:
- a set of aliases for the language matching the specified alias
-
getLanguageNameByExtension
Get the scripting language name given a file-name extension- Parameters:
extension- the file-name extension- Returns:
- the scripting-language name
-
getLanguageNameByAlias
Get the scripting language name given an alias- Parameters:
alias- the alias for the scripting language- Returns:
- the scripting-language name matching the alias
-
supportsLanguage
Determine if a language is supported given the language name.- Parameters:
languageName- the official name for a scripting language- Returns:
- true if the language is supported ; false otherwise
-