scala.tools.nsc.interpreter.SparkILoop

SparkILoopInterpreter

class SparkILoopInterpreter extends SparkIMain

Self Type
SparkILoopInterpreter
Linear Supertypes
SparkIMain, SparkImports, Compilable, AbstractScriptEngine, ScriptEngine, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SparkILoopInterpreter
  2. SparkIMain
  3. SparkImports
  4. Compilable
  5. AbstractScriptEngine
  6. ScriptEngine
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SparkILoopInterpreter()

Type Members

  1. case class ComputedImports(prepend: String, append: String, access: String) extends Product with Serializable

    Compute imports that allow definitions from previous requests to be visible in a new request.

    Compute imports that allow definitions from previous requests to be visible in a new request. Returns three pieces of related code:

    1. An initial code fragment that should go before the code of the new request.

    2. A code fragment that should go after the code of the new request.

    3. An access path which can be traversed to access any bindings inside code wrapped by #1 and #2 .

    The argument is a set of Names that need to be imported.

    Limitations: This method is not as precise as it could be. (1) It does not process wildcard imports to see what exactly they import. (2) If it imports any names from a request, it imports all of them, which is not really necessary. (3) It imports multiple same-named implicits, but only the last one imported is actually usable.

    Definition Classes
    SparkImports
  2. abstract class PhaseDependentOps extends AnyRef

    Definition Classes
    SparkIMain
  3. class ReadEvalPrint extends AnyRef

    Here is where we:

    Here is where we:

    1) Read some source code, and put it in the "read" object. 2) Evaluate the read object, and put the result in the "eval" object. 3) Create a String for human consumption, and put it in the "print" object.

    Read! Eval! Print! Some of that not yet centralized here.

    Definition Classes
    SparkIMain
  4. implicit class ReplTypeOps extends AnyRef

    Definition Classes
    SparkIMain
  5. class Request extends AnyRef

    One line of code submitted by the user for interpretation

    One line of code submitted by the user for interpretation

    Definition Classes
    SparkIMain

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. def allDefinedNames: List[Global.Name]

    Definition Classes
    SparkIMain
  5. def allHandlers: collection.immutable.List[(memberHandlers)#MemberHandler]

    Definition Classes
    SparkIMain
  6. def allImportedNames: collection.immutable.List[Global.Name]

    Definition Classes
    SparkImports
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def backticked(s: String): String

    Definition Classes
    SparkIMain
  9. def beQuietDuring[T](body: ⇒ T): T

    Temporarily be quiet

    Temporarily be quiet

    Definition Classes
    SparkIMain
  10. def beSilentDuring[T](operation: ⇒ T): T

    Definition Classes
    SparkIMain
  11. def bind[T](name: String, value: T)(implicit arg0: reflect.api.JavaUniverse.TypeTag[T], arg1: ClassTag[T]): Results.Result

    Definition Classes
    SparkIMain
  12. def bind(p: NamedParam): Results.Result

    Definition Classes
    SparkIMain
  13. def bind(name: String, boundType: String, value: Any, modifiers: List[String] = Nil): Results.Result

    Bind a specified name to a specified value.

    Bind a specified name to a specified value. The name may later be used by expressions passed to interpret.

    name

    the variable name to bind

    boundType

    the type of the variable, as a string

    value

    the object value to bind to it

    returns

    an indication of whether the binding succeeded

    Definition Classes
    SparkIMain
  14. var bound: Boolean

    Definition Classes
    SparkIMain
  15. def classLoader: util.AbstractFileClassLoader

    Definition Classes
    SparkIMain
  16. def classOfTerm(id: String): Option[JClass]

    Definition Classes
    SparkIMain
  17. def cleanMemberDecl(owner: Global.Symbol, member: Global.Name): Global.Type

    Definition Classes
    SparkIMain
  18. def cleanTypeAfterTyper(sym: ⇒ Global.Symbol): Global.Type

    Definition Classes
    SparkIMain
  19. def clearExecutionWrapper(): Unit

    Definition Classes
    SparkIMain
  20. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def close(): Unit

    This instance is no longer needed, so release any resources it is using.

    This instance is no longer needed, so release any resources it is using. The reporter's output gets flushed.

    Definition Classes
    SparkIMain
  22. var code: String

    Definition Classes
    SparkIMain
  23. def compile(reader: Reader): CompiledScript

    Definition Classes
    SparkIMain → Compilable
    Annotations
    @throws( ... )
  24. def compile(script: String): CompiledScript

    Definition Classes
    SparkIMain → Compilable
    Annotations
    @throws( ... )
  25. def compileSources(sources: SourceFile*): Boolean

    Compile an nsc SourceFile.

    Compile an nsc SourceFile. Returns true if there are no compilation errors, or false otherwise.

    Definition Classes
    SparkIMain
  26. def compileSourcesKeepingRun(sources: SourceFile*): (Boolean, Run)

    Definition Classes
    SparkIMain
  27. def compileString(code: String): Boolean

    Compile a string.

    Compile a string. Returns true if there are no compilation errors, or false otherwise.

    Definition Classes
    SparkIMain
  28. def compiled(script: String): CompiledScript

    Definition Classes
    SparkIMain
  29. def compilerClasspath: Seq[URL]

    Definition Classes
    SparkIMain
  30. def createBindings(): Bindings

    Definition Classes
    SparkIMain → ScriptEngine
  31. def dealiasNonPublic(tp: Global.Type): Global.Type

    Definition Classes
    SparkIMain
  32. def debugging[T](msg: String)(res: T): T

    Definition Classes
    SparkIMain
  33. object deconstruct extends StructuredTypeStrings

    Definition Classes
    SparkIMain
  34. def definedSymbolList: collection.immutable.List[Global.Symbol]

    Definition Classes
    SparkIMain
  35. def definedTerms: collection.immutable.List[Global.TermName]

    Definition Classes
    SparkIMain
  36. def definedTypes: List[Global.TypeName]

    Definition Classes
    SparkIMain
  37. def directBind[T](name: String, value: T)(implicit arg0: reflect.api.JavaUniverse.TypeTag[T], arg1: ClassTag[T]): Results.Result

    Definition Classes
    SparkIMain
  38. def directBind(p: NamedParam): Results.Result

    Definition Classes
    SparkIMain
  39. def directBind(name: String, boundType: String, value: Any): Results.Result

    Definition Classes
    SparkIMain
  40. final def ensureClassLoader(): Unit

    Definition Classes
    SparkIMain
  41. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  42. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  43. def eval(reader: Reader, context: ScriptContext): AnyRef

    Definition Classes
    SparkIMain → ScriptEngine
    Annotations
    @throws( ... )
  44. def eval(script: String, context: ScriptContext): AnyRef

    Definition Classes
    SparkIMain → ScriptEngine
    Annotations
    @throws( ... )
  45. def eval(arg0: String): AnyRef

    Definition Classes
    AbstractScriptEngine → ScriptEngine
    Annotations
    @throws( ... )
  46. def eval(arg0: Reader): AnyRef

    Definition Classes
    AbstractScriptEngine → ScriptEngine
    Annotations
    @throws( ... )
  47. def eval(arg0: String, arg1: Bindings): AnyRef

    Definition Classes
    AbstractScriptEngine → ScriptEngine
    Annotations
    @throws( ... )
  48. def eval(arg0: Reader, arg1: Bindings): AnyRef

    Definition Classes
    AbstractScriptEngine → ScriptEngine
    Annotations
    @throws( ... )
  49. def executionWrapper: String

    Definition Classes
    SparkIMain
  50. object exprTyper extends SparkExprTyper

    Definition Classes
    SparkIMain
  51. val factory: ScriptEngineFactory

    Definition Classes
    SparkIMain
  52. def finalize(): Unit

    Definition Classes
    SparkIMain → AnyRef
  53. object flatOp extends PhaseDependentOps

    Definition Classes
    SparkIMain
  54. def flatPath(sym: Global.Symbol): String

    Definition Classes
    SparkIMain
  55. lazy val formatting: Formatting

    Definition Classes
    SparkILoopInterpreterSparkIMain
  56. def get(arg0: String): AnyRef

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  57. def getBindings(arg0: Int): Bindings

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  58. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  59. def getClassIfDefined(path: String): Global.Symbol

    Definition Classes
    SparkIMain
  60. def getContext(): ScriptContext

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  61. def getFactory(): ScriptEngineFactory

    Definition Classes
    SparkIMain → ScriptEngine
  62. def getModuleIfDefined(path: String): Global.Symbol

    Definition Classes
    SparkIMain
  63. def getScriptContext(arg0: Bindings): ScriptContext

    Attributes
    protected[javax.script]
    Definition Classes
    AbstractScriptEngine
  64. lazy val global: Global

    Definition Classes
    SparkIMain
  65. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  66. def implicitSymbolsBySource: List[(Global.Symbol, List[Global.Symbol])]

    Definition Classes
    SparkImports
  67. def importHandlers: collection.immutable.List[(memberHandlers)#ImportHandler]

    Definition Classes
    SparkIMain
  68. def importedSymbols: collection.immutable.List[Global.Symbol]

    Definition Classes
    SparkImports
  69. def importedSymbolsBySource: List[(Global.Symbol, List[Global.Symbol])]

    Tuples of (source, imported symbols) in the order they were imported.

    Tuples of (source, imported symbols) in the order they were imported.

    Definition Classes
    SparkImports
  70. def importedTermSymbols: collection.immutable.List[Global.TermSymbol]

    Definition Classes
    SparkImports
  71. def importsCode(wanted: Set[Global.Name], wrapper: Wrapper, definedClass: Boolean): ComputedImports

    Attributes
    protected
    Definition Classes
    SparkImports
  72. def initialize(postInitSignal: ⇒ Unit): Unit

    Definition Classes
    SparkIMain
  73. def initializeSynchronous(): Unit

    Definition Classes
    SparkIMain
  74. def interpret(line: String, synthetic: Boolean): Results.Result

    Definition Classes
    SparkIMain
  75. def interpret(line: String): Results.Result

    Interpret one line of input.

    Interpret one line of input. All feedback, including parse errors and evaluation results, are printed via the supplied compiler's reporter. Values defined are available for future interpreted strings.

    The return value is whether the line was interpreter successfully, e.g. that there were no parse errors.

    Definition Classes
    SparkIMain
  76. def interpretSynthetic(line: String): Results.Result

    Definition Classes
    SparkIMain
  77. def isInitializeComplete: Boolean

    Definition Classes
    SparkIMain
  78. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  79. lazy val isettings: SparkISettings

    interpreter settings

    interpreter settings

    Definition Classes
    SparkIMain
  80. def languageSymbols: collection.immutable.List[Global.Symbol]

    Definition Classes
    SparkImports
  81. def languageWildcardHandlers: collection.immutable.List[(memberHandlers)#ImportHandler]

    Definition Classes
    SparkImports
  82. def languageWildcardSyms: List[Global.Symbol]

    Symbols whose contents are language-defined to be imported.

    Symbols whose contents are language-defined to be imported.

    Definition Classes
    SparkImports
  83. def lastRequest: Request

    Definition Classes
    SparkIMain
  84. def lastWarnings: List[(Global.Position, String)]

    Definition Classes
    SparkIMain
  85. lazy val memberHandlers: SparkMemberHandlers { val intp: SparkILoopInterpreter.this.type }

    Definition Classes
    SparkIMain
  86. def mostRecentVar: String

    Returns the name of the most recent interpreter result.

    Returns the name of the most recent interpreter result. Mostly this exists so you can conveniently invoke methods on the previous result.

    Definition Classes
    SparkIMain
  87. def namedDefinedTerms: collection.immutable.List[Global.TermName]

    Definition Classes
    SparkIMain
  88. object naming extends Naming

    Definition Classes
    SparkIMain
  89. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  90. def newCompiler(settings: Settings, reporter: Reporter): ReplGlobal

    Instantiate a compiler.

    Instantiate a compiler. Overridable.

    Attributes
    protected
    Definition Classes
    SparkIMain
  91. final def notify(): Unit

    Definition Classes
    AnyRef
  92. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  93. def onlyTerms(xs: List[Global.Name]): List[Global.TermName]

    Attributes
    protected
    Definition Classes
    SparkIMain
  94. def onlyTypes(xs: List[Global.Name]): List[Global.TypeName]

    Attributes
    protected
    Definition Classes
    SparkIMain
  95. def originalPath(sym: Global.Symbol): String

    Definition Classes
    SparkIMain
  96. def originalPath(name: Global.Name): String

    Definition Classes
    SparkIMain
  97. def originalPath(name: String): String

    Definition Classes
    SparkIMain
  98. val out: JPrintWriter

    Attributes
    protected
    Definition Classes
    SparkIMain
  99. def parentClassLoader: ClassLoader

    Parent classloader.

    Parent classloader. Overridable.

    Attributes
    protected
    Definition Classes
    SparkILoopInterpreterSparkIMain
  100. object parse

    Parse a line into and return parsing result (error, incomplete or success with list of trees)

    Parse a line into and return parsing result (error, incomplete or success with list of trees)

    Definition Classes
    SparkIMain
  101. def prevRequestList: collection.immutable.List[Request]

    Definition Classes
    SparkIMain
  102. def put(arg0: String, arg1: Any): Unit

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  103. def quietBind(p: NamedParam): Results.Result

    Definition Classes
    SparkIMain
  104. def quietRun[T](code: String): Results.Result

    Definition Classes
    SparkIMain
  105. def readRootPath(readPath: String): Global.Symbol

    Definition Classes
    SparkIMain
  106. def rebind(p: NamedParam): Results.Result

    Definition Classes
    SparkIMain
  107. def recordRequest(req: Request): Unit

    Definition Classes
    SparkIMain
  108. object replOutput extends ReplOutput

    Definition Classes
    SparkIMain
  109. def replScope: Global.Scope

    Definition Classes
    SparkIMain
  110. lazy val reporter: SparkReplReporter

    Definition Classes
    SparkIMain
  111. def reset(): Unit

    Reset this interpreter, forgetting all user-specified requests.

    Reset this interpreter, forgetting all user-specified requests.

    Definition Classes
    SparkIMain
  112. def resetClassLoader(): Unit

    Definition Classes
    SparkIMain
  113. def runtimeClassAndTypeOfTerm(id: String): Option[(JClass, Global.Type)]

    Definition Classes
    SparkIMain
  114. lazy val runtimeMirror: Mirror

    Definition Classes
    SparkIMain
  115. def runtimeTypeOfTerm(id: String): Global.Type

    Definition Classes
    SparkIMain
  116. def sessionImportedSymbols: collection.immutable.List[Global.Symbol]

    Definition Classes
    SparkImports
  117. def sessionWildcards: List[Global.Type]

    Types which have been wildcard imported, such as: val x = "abc" ; import x._ // type java.lang.String import java.lang.String._ // object java.lang.String

    Types which have been wildcard imported, such as: val x = "abc" ; import x._ // type java.lang.String import java.lang.String._ // object java.lang.String

    Used by tab completion.

    XXX right now this gets import x._ and import java.lang.String._, but doesn't figure out import String._. There's a lot of ad hoc scope twiddling which should be swept away in favor of digging into the compiler scopes.

    Definition Classes
    SparkImports
  118. def setBindings(arg0: Bindings, arg1: Int): Unit

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  119. def setContext(arg0: ScriptContext): Unit

    Definition Classes
    AbstractScriptEngine → ScriptEngine
  120. def setContextClassLoader(): Unit

    Definition Classes
    SparkIMain
  121. def setExecutionWrapper(code: String): Unit

    Definition Classes
    SparkIMain
  122. def settings: Settings

    Definition Classes
    SparkIMain
  123. def showCodeIfDebugging(code: String): Unit

    Definition Classes
    SparkIMain
  124. def showDirectory(): Unit

    Definition Classes
    SparkIMain
  125. def symbolDefString(sym: Global.Symbol): String

    Definition Classes
    SparkIMain
  126. def symbolOfIdent(id: String): Global.Symbol

    Definition Classes
    SparkIMain
  127. def symbolOfLine(code: String): Global.Symbol

    Definition Classes
    SparkIMain
  128. def symbolOfName(id: Global.Name): Global.Symbol

    Definition Classes
    SparkIMain
  129. def symbolOfTerm(id: String): Global.Symbol

    Definition Classes
    SparkIMain
  130. def symbolOfType(id: String): Global.Symbol

    Definition Classes
    SparkIMain
  131. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  132. def toString(): String

    Definition Classes
    AnyRef → Any
  133. def translateEnclosingClass(n: String): Option[String]

    Definition Classes
    SparkIMain
  134. def translatePath(path: String): Option[String]

    Definition Classes
    SparkIMain
  135. def tryTwice(op: ⇒ Global.Symbol): Global.Symbol

    It's a bit of a shotgun approach, but for now we will gain in robustness.

    It's a bit of a shotgun approach, but for now we will gain in robustness. Try a symbol-producing operation at phase typer, and if that is NoSymbol, try again at phase flatten. I'll be able to lose this and run only from exitingTyper as soon as I figure out exactly where a flat name is sneaking in when calculating imports.

    Definition Classes
    SparkIMain
  136. def typeOfExpression(expr: String, silent: Boolean = true): Global.Type

    Definition Classes
    SparkIMain
  137. def typeOfTerm(id: String): Global.Type

    Definition Classes
    SparkIMain
  138. object typerOp extends PhaseDependentOps

    Definition Classes
    SparkIMain
  139. def unqualifiedIds: List[String]

    Definition Classes
    SparkIMain
  140. def valueOfTerm(id: String): Option[Any]

    Definition Classes
    SparkIMain
  141. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  142. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  143. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  144. def withoutUnwrapping(op: ⇒ Unit): Unit

    Definition Classes
    SparkIMain
  145. def withoutWarnings[T](body: ⇒ T): T

    Definition Classes
    SparkIMain

Deprecated Value Members

  1. def virtualDirectory: ReplDir

    Definition Classes
    SparkIMain
    Annotations
    @deprecated
    Deprecated

    (Since version 2.11.0) Use replOutput.dir instead

Inherited from SparkIMain

Inherited from SparkImports

Inherited from Compilable

Inherited from AbstractScriptEngine

Inherited from ScriptEngine

Inherited from AnyRef

Inherited from Any

Ungrouped