ScriptEngine

dotty.tools.repl.ScriptEngine
See theScriptEngine companion object
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"))

Attributes

Companion
object
Graph
Supertypes
class AbstractScriptEngine
trait ScriptEngine
class Object
trait Matchable
class Any

Members list

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>

Attributes

Inherited from:
AbstractScriptEngine
def eval(x$0: Reader): <FromJavaObject>

Attributes

Inherited from:
AbstractScriptEngine
def eval(x$0: String, x$1: Bindings): <FromJavaObject>

Attributes

Inherited from:
AbstractScriptEngine
def eval(x$0: Reader, x$1: Bindings): <FromJavaObject>

Attributes

Inherited from:
AbstractScriptEngine
def get(x$0: String): <FromJavaObject>

Attributes

Inherited from:
AbstractScriptEngine
def getBindings(x$0: Int): Bindings

Attributes

Inherited from:
AbstractScriptEngine
def getContext(): ScriptContext

Attributes

Inherited from:
AbstractScriptEngine
def put(x$0: String, x$1: <FromJavaObject>): Unit

Attributes

Inherited from:
AbstractScriptEngine
def setBindings(x$0: Bindings, x$1: Int): Unit

Attributes

Inherited from:
AbstractScriptEngine
def setContext(x$0: ScriptContext): Unit

Attributes

Inherited from:
AbstractScriptEngine