public abstract class ScriptEngine extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Map |
context |
static String |
CONTEXT_VARIABLE_NAME |
| Modifier | Constructor and Description |
|---|---|
protected |
ScriptEngine(Map context)
Constructor - initializes context of variables.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
abstract Object |
eval(String expression)
Evaluates specified expression or code block.
|
protected void |
pushAllVariablesFromContextToScriptEngine()
Push all the variables from variables context to the script engine.
|
void |
setInContext(String name,
Object value)
Sets the specified variable in the context.
|
abstract void |
setVariable(String name,
Object value)
Sets variable in scripter context.
|
public static final String CONTEXT_VARIABLE_NAME
protected Map context
protected ScriptEngine(Map context)
context - public abstract void setVariable(String name, Object value)
name - value - public abstract Object eval(String expression)
protected void pushAllVariablesFromContextToScriptEngine()
public void setInContext(String name, Object value)
name - value - public void dispose()
Copyright © 2022 WSO2. All rights reserved.