MCPcopy Index your code
hub / github.com/apache/groovy / run

Method run

src/main/java/groovy/util/GroovyScriptEngine.java:629–634  ·  view source on GitHub ↗

Run a script identified by name with a single argument. @param scriptName name of the script to run @param argument a single argument passed as a variable named arg in the binding @return a toString() representation of the result of the execution of the script @throws Re

(String scriptName, String argument)

Source from the content-addressed store, hash-verified

627 * @throws ScriptException if there is a problem parsing the script
628 */
629 public String run(String scriptName, String argument) throws ResourceException, ScriptException {
630 Binding binding = new Binding();
631 binding.setVariable("arg", argument);
632 Object result = run(scriptName, binding);
633 return result == null ? "" : result.toString();
634 }
635
636 /**
637 * Run a script identified by name with a given binding.

Callers 2

mainMethod · 0.95

Calls 4

setVariableMethod · 0.95
createScriptMethod · 0.95
toStringMethod · 0.65
runMethod · 0.65

Tested by 1