trait ReplAPI extends AnyRef
- Alphabetic
- By Inheritance
- ReplAPI
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
- abstract def _compilerManager: CompilerLifecycleManager
- abstract def clipboard: Clipboard
- implicit abstract def codeColorsImplicit: CodeColors
-
abstract
val
frontEnd: Ref[FrontEnd]
The front-end REPL used to take user input.
The front-end REPL used to take user input. Modifiable!
-
abstract
def
fullHistory: History
History of commands that have been entered into the shell, including previous sessions
-
abstract
def
fullImports: Imports
Shows all imports added that bring values into scope for the commands a user runs; *includes* imports from the built-in predef and user predef files
-
abstract
def
height: Int
Current height of the terminal
-
abstract
def
help: String
Display help text if you don't know how to use the REPL
-
abstract
def
history: History
History of commands that have been entered into the shell during the current session
-
abstract
def
imports: Imports
Shows the imports added to scope by the commands a user has entered so far; *excludes* imports from the built-in predef and user predef files
-
abstract
def
lastException: Throwable
The last exception that was thrown in the REPL;
null
if nothing has yet been thrown.The last exception that was thrown in the REPL;
null
if nothing has yet been thrown. Useful if you want additional information from the thrown exception than the printed stack trace (e.g. many exceptions have additional metadata attached) or if you want to show the stack trace on an exception that doesn't normally print it (e.g. seeing the stack when a Ctrl-C interrupt happened) vialastException.printStackTrace
. - abstract def load: ReplLoad
-
abstract
def
newCompiler(): Unit
Throw away the current scala.tools.nsc.Global and get a new one
- abstract def pprinter: Ref[PPrinter]
-
abstract
val
prompt: Ref[String]
Read/writable prompt for the shell.
Read/writable prompt for the shell. Use this to change the REPL prompt at any time!
-
abstract
def
sess: Session
Functions that can be used to manipulate the current REPL session: check-pointing progress, reverting to earlier checkpoints, or deleting checkpoints by name.
Functions that can be used to manipulate the current REPL session: check-pointing progress, reverting to earlier checkpoints, or deleting checkpoints by name.
Frames get pushed on a stack; by default, a saved frame is accessible simply by calling
load
. If you provide a name whensave
ing a checkpoint, it can later beload
ed directly by providing the same name toload
Un-named checkpoints are garbage collected, together with their classloader and associated data, when they are no longer accessible due to
restore
. Named checkpoints are kept forever; calldelete
on them if you really want them to go away. -
abstract
def
show(t: Any, width: Integer = null, height: Integer = null, indent: Integer = null): Unit
Lets you configure the pretty-printing of a value.
Lets you configure the pretty-printing of a value. By default, it simply disables truncation and prints the entire thing, but you can set other parameters as well if you want.
- abstract def show(t: Any): Unit
-
implicit abstract
def
tprintColorsImplicit: TPrintColors
Controls how things are pretty-printed in the REPL.
Controls how things are pretty-printed in the REPL. Feel free to shadow this with your own definition to change how things look
-
abstract
def
typeOf[T](t: ⇒ T)(implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): scala.reflect.api.JavaUniverse.Type
Get the
Type
object representing the type oft
.Get the
Type
object representing the type oft
. Useful for finding what its methods are and what you can do with it -
abstract
def
typeOf[T](implicit arg0: scala.reflect.api.JavaUniverse.WeakTypeTag[T]): scala.reflect.api.JavaUniverse.Type
Get the
Type
object of T.Get the
Type
object of T. Useful for finding what its methods are and what you can do with it -
abstract
def
usedEarlierDefinitions: Seq[String]
If class wrapping is enabled, this lists the names of the previous commands that the current commands actually references (as told by the scalac).
If class wrapping is enabled, this lists the names of the previous commands that the current commands actually references (as told by the scalac).
E.g. in a session like
@ val n = 2 n: Int = 2
@ val p = 1 p: Int = 1
@ n + p res2: Int = 3
val p = 1
orthis would have returned an empty list if called from the same line as
val n = 2. This would have returned
Seq("cmd0", "cmd1")if called from the same line as
n + p, as both
cmd0, that defines
n, and
cmd1, that defines
p, are referenced from this line.
-
abstract
def
width: Int
Current width of the terminal
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )