ammonite

interp

package interp

What actually lets us compile and execute code in the Ammonite REPL; deals with the Scala compiler, preprocessing the strings, JVM classloaders, etc.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. interp
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class AmmonitePlugin extends Plugin

    Used to capture the names in scope after every execution, reporting them to the output function.

    Used to capture the names in scope after every execution, reporting them to the output function. Needs to be a compiler plugin so we can hook in immediately after the typer

  2. trait Compiler extends AnyRef

    Encapsulates (almost) all the ickiness of Scalac so it doesn't leak into the rest of the codebase.

    Encapsulates (almost) all the ickiness of Scalac so it doesn't leak into the rest of the codebase. Makes use of a good amount of mutable state for things like the log-output-forwarder or compiler-plugin-output because These things are hard-coded into Scalac and can't be passed in from run to run.

    Turns source-strings into the bytes of classfiles, possibly more than one classfile per source-string (e.g. inner classes, or lambdas). Also lets you query source strings using an in-built presentation compiler

  3. trait Evaluator extends AnyRef

    Evaluates already-compiled Bytecode.

    Evaluates already-compiled Bytecode.

    Deals with all the munging of Classloaders, Class[_] objects, and Array[Byte]s representing class files, and reflection necessary to take the already-compile Scala bytecode and execute it in our process.

  4. class Frame extends AnyRef

    Represents a single "frame" of the sess.save/sess.load stack/tree.

    Represents a single "frame" of the sess.save/sess.load stack/tree.

    Exposes imports and classpath as readable but only writable in particular ways: imports can only be updated via mergeImports, while classpath can only be added to.

  5. class History extends IndexedSeq[String] with IndexedSeqLike[String, History]

  6. trait ImportHook extends AnyRef

    An extensible hook into the Ammonite REPL's import system; allows the end user to hook into import $foo.bar.{baz, qux => qua} syntax, and in response load jars or process source files before the "current" compilation unit is run.

    An extensible hook into the Ammonite REPL's import system; allows the end user to hook into import $foo.bar.{baz, qux => qua} syntax, and in response load jars or process source files before the "current" compilation unit is run. Can be used to load script files, ivy dependencies, jars, or files from the web.

  7. class Interpreter extends InterpreterInterface

    A convenient bundle of all the functionality necessary to interpret Scala code.

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

  8. trait Preprocessor extends AnyRef

    Responsible for all scala-source-code-munging that happens within the Ammonite REPL.

    Responsible for all scala-source-code-munging that happens within the Ammonite REPL.

    Performs several tasks:

    - Takes top-level Scala expressions and assigns them to res{1, 2, 3, ...} values so they can be accessed later in the REPL

    - Wraps the code snippet with an wrapper object since Scala doesn't allow top-level expressions

    - Mangles imports from our ammonite.util.ImportData data structure into a source String

    - Combines all of these into a complete compilation unit ready to feed into the Scala compiler

  9. trait Pressy extends AnyRef

    Nice wrapper for the presentation compiler.

  10. class SpecialClassLoader extends URLClassLoader

    Classloader used to implement the jar-downloading command-evaluating logic in Ammonite.

    Classloader used to implement the jar-downloading command-evaluating logic in Ammonite.

    http://stackoverflow.com/questions/3544614/how-is-the-control-flow-to-findclass-of

  11. trait Storage extends AnyRef

    Trait for the interface of common persistent storage.

    Trait for the interface of common persistent storage. This handles history and persistent caches. Right now it is not threadsafe nor does it handle the mutual exclusion of files between processes. Mutexes should be added to be able to run multiple Ammonite processes on the same system.

Value Members

  1. object AmmonitePlugin

  2. object Classpath

    Loads the jars that make up the classpath of the scala-js-fiddle compiler and re-shapes it into the correct structure to satisfy scala-compile and scalajs-tools

  3. object Compiler

  4. object CompilerCompatibility

  5. object Evaluator

  6. object History

  7. object ImportHook

  8. object Interpreter

  9. object LineNumberModifier

  10. object Preprocessor

  11. object Pressy

  12. object SpecialClassLoader

  13. object Storage

Inherited from AnyRef

Inherited from Any

Ungrouped