Interpreter

ammonite.interp.Interpreter
See theInterpreter companion object
class Interpreter(val compilerBuilder: CompilerBuilder, parser: () => Parser, getFrame: () => Frame, val createFrame: () => Frame, replCodeWrapper: CodeWrapper, val scriptCodeWrapper: CodeWrapper, parameters: Parameters) extends InterpreterInterface

A convenient bundle of all the functionality necessary to interpret Scala code. Doesn't attempt to provide any real encapsulation for now.

Attributes

Companion
object
Graph
Supertypes
trait InterpreterInterface
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

abstract class DefaultLoadJar extends LoadJar

Attributes

Supertypes
trait LoadJar
class Object
trait Matchable
class Any

Types

type BlockData = Option[(ClassFiles, BlockMetadata)]

Value members

Concrete methods

def compilationCount: Int
def dependencyComplete: String => (Int, Seq[String])
def evalClassloader: SpecialClassLoader
def evaluateLine(processed: Output, fileName: String, indexedWrapperName: Name, silent: Boolean, incrementLine: () => Unit): Res[(Evaluated, Tag)]
def frameImports: Imports
def frameUsedEarlierDefinitions: Seq[String]
def handleImports(i: Imports): Unit
def headFrame: Frame
def initializePredef(basePredefs: Seq[PredefInfo], customPredefs: Seq[PredefInfo], extraBridges: Seq[(String, String, AnyRef)], baseImports: Imports): Option[(Failing, Seq[(Watchable, Long)])]
def loadIvy(coordinates: Dependency*): Either[String, Seq[File]]
def pluginClassloader: SpecialClassLoader
def processAllScriptBlocks(blocks: Seq[BlockData], splittedScript: => Res[IndexedSeq[(String, Seq[String])]], startingImports: Imports, codeSource: CodeSource, evaluate: (Output, Name) => Res[(Evaluated, Tag)], autoImport: Boolean, extraCode: String): Res[Metadata]
def processExec(code: String, currentLine: Int, incrementLine: () => Unit): Res[Imports]
def processLine(code: String, stmts: Seq[String], currentLine: Int, silent: Boolean, incrementLine: () => Unit): Res[Evaluated]
def processModule(code: String, codeSource: CodeSource, autoImport: Boolean, extraCode: String, hardcoded: Boolean, moduleCodeWrapper: CodeWrapper): Res[Metadata]
def processSingleBlock(processed: Output, codeSource0: CodeSource, indexedWrapperName: Name): Res[(Evaluated, Tag)]
def resolveImportHooks(importTrees: Seq[ImportTree], hookedStmts: Seq[String], source: CodeSource, wrapperPath: Seq[Name]): Res[ImportHookInfo]
def resolveSingleImportHook(source: CodeSource, tree: ImportTree, wrapperPath: Seq[Name]): Res[Seq[Imports]]
def scalaVersion: String
def watch(p: Path): Unit
def watchValue[T](v: => T): Buffer[(Watchable, Long)]

Concrete fields

val alreadyLoadedFiles: Map[CodeSource, Metadata]
val beforeExitHooks: Buffer[Any => Any]
val compilerBuilder: CompilerBuilder
val compilerManager: CompilerLifecycleManager
val createFrame: () => Frame
val eval: Evaluator
lazy val interpApi: InterpAPI
val mainThread: Thread
var predefImports: Imports
val repositories: Ref[List[Repository]]
val resolutionHooks: Buffer[Fetch => Fetch]
val scriptCodeWrapper: CodeWrapper
val watchedValues: Buffer[(Watchable, Long)]