javax.script
Class ScriptEngine
| Method Summary | 
| Object | eval(String script, Binding binding)Executes the specified script.
 | 
| Object | eval(Reader reader, Binding binding)Same as
 eval(ScriptEngine, Reader, Binding)except that the
source of the script is provided as aReader | 
 
eval
public Object eval(String script, Binding binding)
-  
- Executes the specified script.  The default ScriptContextfor theScriptEngineis used. Variables from a GroovyBindingare made available in the default scope of theBindingsof theScriptEngine. Resulting variables in theBindingsare returned back to the GroovyBinding.
- Parameters:
- script-  The script language source to be executed.
- binding-  A Groovy binding.
- Returns:
- The value returned from the execution of the script (if supported by the Script engine)
- Since:
- 1.7.3
- See:
- ScriptEngine#eval.
eval
public Object eval(Reader reader, Binding binding)
-  
- Same as eval(ScriptEngine, Reader, Binding)except that the
source of the script is provided as aReader
- Parameters:
- reader-  The source of the script.
- binding-  A Groovy binding.
- Returns:
- The value returned by the script
- Since:
- 1.7.3
- See:
- ScriptEngine#eval.