Compiler

trait Compiler
class Object
trait Matchable
class Any

Value members

Abstract methods

def compile(source: String): Array[Byte]

Synchronous call to compile a source code consisting of a body which is wrapped in a Function0 apply method, returning the raw jar file produced in the compilation.

Synchronous call to compile a source code consisting of a body which is wrapped in a Function0 apply method, returning the raw jar file produced in the compilation.

May throw CompilationFailed or CodeIncomplete

Value Params
source

the completely formatted source code to compile which should contain a proper package and class definition. It must contain any necessary import statements.

Returns

the jar file as byte-array, containing the opaque contents of the source code (possible the one single class defined)

def interpret(source: String, print: Boolean, execute: Boolean): Any

Synchronous call to compile and execute the provided source code.

Synchronous call to compile and execute the provided source code.

May throw CompilationFailed or CodeIncomplete

Value Params
source

the completely formatted source code to compile which forms the body of an imported object. It must contain any necessary import statements.

Returns

the evaluation result, or () if there is no result value

Implicits

Implicits

implicit
def executionContext: ExecutionContext