scala.tools.nsc.interpreter

ILoop

class ILoop extends LoopCommands with ILoopInit

The Scala interactive shell. It provides a read-eval-print loop around the Interpreter class. After instantiation, clients should call the main() method.

If no in0 is specified, then input will come from the console, and the class will attempt to provide input editing feature such as input history.

Source
ILoop.scala
Version

1.2

Linear Supertypes
ILoopInit, LoopCommands, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. ILoop
  2. ILoopInit
  3. LoopCommands
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ILoop()

  2. new ILoop(in0: BufferedReader, out: JPrintWriter)

  3. new ILoop(in0: Option[BufferedReader], out: JPrintWriter)

Type Members

  1. class ILoopInterpreter extends IMain

  2. class LineCmd extends LoopCommand

  3. abstract class LoopCommand extends (String) ⇒ Result

  4. class NullaryCmd extends LoopCommand

  5. case class Result(keepRunning: Boolean, lineToRecord: Option[String]) extends Product with Serializable

  6. class VarArgsCmd extends LoopCommand

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. object LoopCommand extends AnyRef

  7. object Result extends Serializable

  8. def addClasspath(arg: String): Unit

  9. def addReplay(cmd: String): Unit

    Record a command for replay should the user request a :replay

  10. def addThunk(body: ⇒ Unit): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  11. var addedClasspath: String

  12. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  13. def asyncMessage(msg: String): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  14. def awaitInitialized(): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  15. def chooseReader(settings: Settings): InteractiveReader

    Tries to create a JLineReader, falling back to SimpleReader: unless settings or properties are such that it should start with SimpleReader.

  16. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def closeInterpreter(): Unit

    Close the interpreter and set the var to null.

  18. def command(line: String): Result

    Run one command submitted by the user.

    Run one command submitted by the user. Two values are returned: (1) whether to keep running, (2) the line to record for replay, if any.

  19. def commands: List[LoopCommand]

    Available commands

  20. def createAsyncListener(): Future[Unit]

    Attributes
    protected
    Definition Classes
    ILoopInit
  21. def createInterpreter(): Unit

    Create a new interpreter.

  22. def echo(msg: String): Unit

    Attributes
    protected
  23. def echoAndRefresh(msg: String): Unit

    Attributes
    protected
  24. def echoCommandMessage(msg: String): Unit

    Definition Classes
    ILoopLoopCommands
  25. def echoNoNL(msg: String): Unit

    Attributes
    protected
  26. def enablePowerMode(isDuringInit: Boolean): Unit

  27. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  30. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. def helpCommand(line: String): Result

    print a friendly help message

  33. def history: History

  34. lazy val historyCommand: LoopCommand { def defaultLines: Int }

    Show the history

  35. var in: InteractiveReader

  36. def initializedCallback(): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  37. def installSigIntHandler(): Unit

    Try to install sigint handler: ignore failure.

    Try to install sigint handler: ignore failure. Signal handler will interrupt current line execution if any is in progress.

    Attempting to protect the repl from accidental exit, we only honor a single ctrl-C if the current buffer is empty: otherwise we look for a second one within a short time.

    Attributes
    protected
    Definition Classes
    ILoopInit
  38. def interpretAllFrom(file: File): Unit

    interpret all lines from a specified file

  39. def interpretStartingWith(code: String): Option[String]

    Interpret expressions starting with the first line.

    Interpret expressions starting with the first line. Read lines until a complete compilation unit is available or until a syntax error has been seen. If a full unit is read, go ahead and interpret it. Return the full string to be recorded for replay, if any.

  40. var intp: IMain

  41. def isAsync: Boolean

  42. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  43. def loadCommand(arg: String): Result

  44. def loadFiles(settings: Settings): Unit

  45. def loop(): Unit

    The main read-eval-print loop for the repl.

    The main read-eval-print loop for the repl. It calls command() for each line of input, and stops when command() returns false.

  46. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  47. def newJavap(): Javap

    Attributes
    protected
  48. final def notify(): Unit

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

    Definition Classes
    AnyRef
  50. val originalClassLoader: ClassLoader

    The context class loader at the time this object was created

    The context class loader at the time this object was created

    Attributes
    protected
  51. val out: JPrintWriter

    Attributes
    protected
    Definition Classes
    ILoopLoopCommands
  52. def pasteCommand(): Result

  53. def postInitThunks: List[() ⇒ Unit]

    Attributes
    protected
    Definition Classes
    ILoopInit
  54. def postInitialization(): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  55. lazy val power: Power

  56. def powerCmd(): Result

  57. lazy val powerCommands: List[LoopCommand]

    Power user commands

  58. def printWelcome(): Unit

    Print a welcome message

    Print a welcome message

    Definition Classes
    ILoopInit
  59. def process(args: Array[String]): Boolean

    process command-line arguments and do as they request

  60. def process(settings: Settings): Boolean

  61. def prompt: String

    Prompt to print when awaiting input

  62. def replay(): Unit

    create a new interpreter and replay all commands so far

  63. var replayCommandStack: List[String]

    A reverse list of commands to replay if the user requests a :replay

  64. def replayCommands: List[String]

    A list of commands to replay if the user requests a :replay

  65. val replayQuestionMessage: String

  66. def runThunks(): Unit

    Attributes
    protected
    Definition Classes
    ILoopInit
  67. def searchHistory(_cmdline: String): Unit

    Search the history

  68. def setPrompt(prompt: String): Unit

  69. var settings: Settings

  70. lazy val shCommand: LoopCommand

    fork a shell and run a command

  71. lazy val standardCommands: List[LoopCommand]

    Standard commands *

  72. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  73. def toString(): String

    Definition Classes
    AnyRef → Any
  74. def verbosity(): Unit

  75. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  78. def withFile(filename: String)(action: (File) ⇒ Unit): Unit

Deprecated Value Members

  1. def interpreter: IMain

    Annotations
    @deprecated
    Deprecated

    (Since version 2.9.0) Use intp instead.

  2. def interpreter_=(i: Interpreter): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2.9.0) Use intp instead.

  3. def main(settings: Settings): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2.9.0) Use process instead

  4. def main(args: Array[String]): Unit

    Annotations
    @deprecated
    Deprecated

    (Since version 2.9.0) Use process instead

Inherited from ILoopInit

Inherited from LoopCommands

Inherited from AnyRef

Inherited from Any