ScriptEngine

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 Object
trait Matchable
class Any

Value members

Concrete methods

@throws(scala.throws.$lessinit$greater$default$1[javax.script.ScriptException])
def eval(script: String, context: ScriptContext): Object
@throws(scala.throws.$lessinit$greater$default$1[javax.script.ScriptException])
def eval(reader: Reader, context: ScriptContext): Object

Inherited methods

@throws(javax.script.ScriptException)
def eval(`x$0`: String): `<FromJavaObject>`
Inherited from
AbstractScriptEngine
@throws(javax.script.ScriptException)
def eval(`x$0`: Reader): `<FromJavaObject>`
Inherited from
AbstractScriptEngine
@throws(javax.script.ScriptException)
def eval(`x$0`: String, `x$1`: Bindings): `<FromJavaObject>`
Inherited from
AbstractScriptEngine
@throws(javax.script.ScriptException)
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 put(`x$0`: String, `x$1`: `<FromJavaObject>`): Unit
Inherited from
AbstractScriptEngine
def setBindings(`x$0`: Bindings, `x$1`: Int): Unit
Inherited from
AbstractScriptEngine