ScriptEngine

class ScriptEngine extends AbstractScriptEngine

A JSR 223 (Scripting API) compatible wrapper around the REPL for improved interoperability with software that supports it.

It works by instantiating a new script engine through the script engine manager. The script engine provides a eval method to evaluate scripts in string form. Example use:

val m = new javax.script.ScriptEngineManager() val e = m.getEngineByName("scala") println(e.eval("42"))

Companion:
object
class AbstractScriptEngine
trait ScriptEngine
class Object
trait Matchable
class Any

Value members

Concrete methods

def createBindings: Bindings
def eval(script: String, context: ScriptContext): Object
def eval(reader: Reader, context: ScriptContext): Object
def getFactory: ScriptEngineFactory

Inherited methods

def eval(x$0: String): <FromJavaObject>
Inherited from:
AbstractScriptEngine
def eval(x$0: Reader): <FromJavaObject>
Inherited from:
AbstractScriptEngine
def eval(x$0: String, x$1: Bindings): <FromJavaObject>
Inherited from:
AbstractScriptEngine
def eval(x$0: Reader, x$1: Bindings): <FromJavaObject>
Inherited from:
AbstractScriptEngine
def get(x$0: String): <FromJavaObject>
Inherited from:
AbstractScriptEngine
def getBindings(x$0: Int): Bindings
Inherited from:
AbstractScriptEngine
def getContext(): ScriptContext
Inherited from:
AbstractScriptEngine
def put(x$0: String, x$1: <FromJavaObject>): Unit
Inherited from:
AbstractScriptEngine
def setBindings(x$0: Bindings, x$1: Int): Unit
Inherited from:
AbstractScriptEngine
def setContext(x$0: ScriptContext): Unit
Inherited from:
AbstractScriptEngine