public class EnvJavaScript extends Object
Functions are loaded from the file named in context setting
symJavaScriptLibFile
.
The file must be UTF-8 encoded.
Function are loaded from a string value in context setting
symJavaScriptFunctions
.
If both are present, the file named by EnvJavaScript.symJavaScriptLibFile
is loaded
then the string from EnvJavaScript.symJavaScriptLib
.
Modifier and Type | Field and Description |
---|---|
static Symbol |
symJavaScriptFunctions
JavaScript functions as a string value which is evaluated.
|
static Symbol |
symJavaScriptLibFile
JavaScript library of functions in a file.
|
Modifier and Type | Method and Description |
---|---|
Object |
call(String functionName,
Object[] args) |
static EnvJavaScript |
create(Context context) |
static EnvJavaScript |
get()
Return the global
EnvJavaScript . |
static void |
reset()
Reset the global
EnvJavaScript based on the system-wide context |
static void |
reset(Context context)
Reset the global
EnvJavaScript |
public static Symbol symJavaScriptFunctions
public static Symbol symJavaScriptLibFile
public static EnvJavaScript create(Context context)
public static EnvJavaScript get()
EnvJavaScript
.
Returns null if no JavaScript has been provided.public static void reset()
EnvJavaScript
based on the system-wide contextpublic static void reset(Context context)
EnvJavaScript
public Object call(String functionName, Object[] args) throws NoSuchMethodException, ScriptException
NoSuchMethodException
ScriptException
Licenced under the Apache License, Version 2.0