Class ScriptLanguageProvider
java.lang.Object
qupath.lib.gui.scripting.languages.ScriptLanguageProvider
Class with static methods to fetch all the available ScriptLanguages.
- Since:
- v0.4.0
- Author:
- Melvin Gelbard, Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic ScriptLanguage
fromString
(String languageString) Get theScriptLanguage
object corresponding to the specified String.static Collection
<ScriptLanguage> Get the available script languages.static ScriptEngine
getEngineByName
(String languageName) Get theScriptEngine
based on its name.static ScriptLanguage
Return the firstScriptLanguage
compatible with the specified extension (can be runnable or not).static ScriptLanguage
getLanguageFromName
(String name) Given a file name, determine the associated language - or null if no suitable (supported) language can be found.
-
Constructor Details
-
ScriptLanguageProvider
public ScriptLanguageProvider()
-
-
Method Details
-
getAvailableLanguages
Get the available script languages.- Returns:
-
getLanguageFromName
Given a file name, determine the associated language - or null if no suitable (supported) language can be found.- Parameters:
name
-- Returns:
-
fromString
Get theScriptLanguage
object corresponding to the specified String. If the string cannot be matched,PlainLanguage
is returned.- Parameters:
languageString
-- Returns:
- corresponding script language, or
PlainLanguage
if no match
-
getLanguageFromExtension
Return the firstScriptLanguage
compatible with the specified extension (can be runnable or not).- Parameters:
ext
- the extension of the script file- Returns:
- compatible script language
-
getEngineByName
Get theScriptEngine
based on its name.- Parameters:
languageName
-- Returns:
- script engine
-