Package ortus.boxlang.runtime.scripting
Class BoxScriptingFactory
java.lang.Object
ortus.boxlang.runtime.scripting.BoxScriptingFactory
- All Implemented Interfaces:
ScriptEngineFactory
BoxScriptingFactory is used to describe and instantiate
ScriptEngines for BoxLang based on JSR-223.
See ScriptEngineManager() and
ScriptEngineManager(java.lang.ClassLoader).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the name of the scripting engine.Returns the version of the scripting engine.Get the supported extensions for BoxLangReturns the name of the scripting language supported by the engine.Returns the version of the scripting language supported by the engine.getMethodCallSyntax(String obj, String m, String... args) Builds a BoxLang method call using the object and method name and the argumentsGet the supported mime types for BoxLanggetNames()Get the supported names for BoxLanggetOutputStatement(String toDisplay) Build a BoxLang output statement usingwriteoutputgetParameter(String key) Get the supported parameters for BoxLanggetProgram(String... statements) Builds out a program from a collection of statemetns by joining them with semicolons and newlinesBuild a new BoxLang ScriptEnginegetScriptEngine(Boolean debug) Build a new BoxLang ScriptEngine
-
Constructor Details
-
BoxScriptingFactory
public BoxScriptingFactory()
-
-
Method Details
-
getEngineName
Returns the name of the scripting engine.- Specified by:
getEngineNamein interfaceScriptEngineFactory- Returns:
- The name of the scripting engine.
-
getEngineVersion
Returns the version of the scripting engine.- Specified by:
getEngineVersionin interfaceScriptEngineFactory- Returns:
- The version of the scripting engine.
-
getLanguageName
Returns the name of the scripting language supported by the engine.- Specified by:
getLanguageNamein interfaceScriptEngineFactory- Returns:
- The name of the scripting language supported by the engine.
-
getLanguageVersion
Returns the version of the scripting language supported by the engine.- Specified by:
getLanguageVersionin interfaceScriptEngineFactory- Returns:
- The version of the scripting language supported by the engine.
-
getMethodCallSyntax
Builds a BoxLang method call using the object and method name and the arguments- Specified by:
getMethodCallSyntaxin interfaceScriptEngineFactory- Parameters:
obj- The object to call the method onm- The method to callargs- The arguments to pass to the method- Returns:
- The constructed BoxLang method call
-
getOutputStatement
Build a BoxLang output statement usingwriteoutput- Specified by:
getOutputStatementin interfaceScriptEngineFactory- Parameters:
toDisplay- The string to display- Returns:
- A BoxLang output statement
-
getProgram
Builds out a program from a collection of statemetns by joining them with semicolons and newlines- Specified by:
getProgramin interfaceScriptEngineFactory- Parameters:
statements- The statements to be executed- Returns:
- A valid BoxLang program
-
getScriptEngine
Build a new BoxLang ScriptEngine- Specified by:
getScriptEnginein interfaceScriptEngineFactory- Returns:
- A new BoxLang ScriptEngine
-
getScriptEngine
Build a new BoxLang ScriptEngine- Parameters:
debug- Whether or not to enable debugging- Returns:
- A new BoxLang ScriptEngine
-
getExtensions
Get the supported extensions for BoxLang- Specified by:
getExtensionsin interfaceScriptEngineFactory
-
getMimeTypes
Get the supported mime types for BoxLang- Specified by:
getMimeTypesin interfaceScriptEngineFactory
-
getNames
Get the supported names for BoxLang- Specified by:
getNamesin interfaceScriptEngineFactory
-
getParameter
Get the supported parameters for BoxLang- Specified by:
getParameterin interfaceScriptEngineFactory- Parameters:
key- The key to get the parameter for- Returns:
- The parameter value
-