MCPcopy Create free account
hub / github.com/apache/pig / jsEval

Method jsEval

src/org/apache/pig/scripting/js/JsScriptEngine.java:131–137  ·  view source on GitHub ↗

evaluate a javascript String @param name the name of the script (for error messages) @param script the content of the script @return the result

(String name, String script)

Source from the content-addressed store, hash-verified

129 * @return the result
130 */
131 public Object jsEval(String name, String script) {
132 try {
133 return getContext().evaluateString(scope, script, name, 1, null);
134 } catch (EcmaError e) {
135 throw new RuntimeException("can't evaluate "+name+": "+script,e);
136 }
137 }
138
139 /**
140 * evaluate javascript from a reader

Callers 4

evalMethod · 0.95
loadMethod · 0.95
mainMethod · 0.95
JsFunctionMethod · 0.80

Calls 1

getContextMethod · 0.95

Tested by

no test coverage detected