Package com.intuit.karate.graal
Class JsEngine
- java.lang.Object
-
- com.intuit.karate.graal.JsEngine
-
public class JsEngine extends Object
- Author:
- pthomas3
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ObjectattachAll(Object o)JsEnginecopy()JsValueeval(File file)JsValueeval(InputStream is)JsValueeval(String exp)org.graalvm.polyglot.ValueevalForValue(String exp)static JsValueevalGlobal(InputStream is)static JsValueevalGlobal(String src)org.graalvm.polyglot.ValueevalWith(Map<String,Object> variables, String src, boolean returnValue)org.graalvm.polyglot.ValueevalWith(Set<String> names, java.util.function.Function<String,Object> getVariable, String src, boolean returnValue)org.graalvm.polyglot.ValueevalWith(org.graalvm.polyglot.Value value, String src, boolean returnValue)static Objectexecute(org.graalvm.polyglot.proxy.ProxyExecutable function, Object... args)static org.graalvm.polyglot.Valueexecute(org.graalvm.polyglot.Value function, Object... args)static KarateExceptionfromJsEvalException(String js, Exception e, String message)JsValueget(String key)static JsEngineglobal()static JsEnginelocal()voidput(String key, Object value)voidputAll(Map<String,Object> map)static voidremove()voidremove(String key)StringtoString()
-
-
-
Method Detail
-
evalGlobal
public static JsValue evalGlobal(InputStream is)
-
global
public static JsEngine global()
-
remove
public static void remove()
-
local
public static JsEngine local()
-
copy
public JsEngine copy()
-
eval
public JsValue eval(InputStream is)
-
evalForValue
public org.graalvm.polyglot.Value evalForValue(String exp)
-
remove
public void remove(String key)
-
execute
public static Object execute(org.graalvm.polyglot.proxy.ProxyExecutable function, Object... args)
-
execute
public static org.graalvm.polyglot.Value execute(org.graalvm.polyglot.Value function, Object... args)
-
evalWith
public org.graalvm.polyglot.Value evalWith(org.graalvm.polyglot.Value value, String src, boolean returnValue)
-
evalWith
public org.graalvm.polyglot.Value evalWith(Map<String,Object> variables, String src, boolean returnValue)
-
evalWith
public org.graalvm.polyglot.Value evalWith(Set<String> names, java.util.function.Function<String,Object> getVariable, String src, boolean returnValue)
-
fromJsEvalException
public static KarateException fromJsEvalException(String js, Exception e, String message)
-
-