ammonite.repl.tools

source

object source

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

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. def apply(f: ⇒ Any, command: (Int) ⇒ Strings)(implicit pprinter: PPrinter, colors: CodeColors): Unit

    Annotations
    @macroImpl( ... )
  7. def apply(f: ⇒ Any)(implicit pprinter: PPrinter, colors: CodeColors): Unit

    Annotations
    @macroImpl( ... )
  8. def applyMacro0(c: Context)(f: scala.reflect.macros.Context.Expr[Any]): scala.reflect.macros.Context.Expr[Location]

  9. def applyMacro1(c: Context)(f: scala.reflect.macros.Context.Expr[Any])(pprinter: scala.reflect.macros.Context.Expr[PPrinter], colors: scala.reflect.macros.Context.Expr[CodeColors]): scala.reflect.macros.Context.Expr[Unit]

  10. def applyMacro2(c: Context)(f: scala.reflect.macros.Context.Expr[Any], command: scala.reflect.macros.Context.Expr[(Int) ⇒ Strings])(pprinter: scala.reflect.macros.Context.Expr[PPrinter], colors: scala.reflect.macros.Context.Expr[CodeColors]): scala.reflect.macros.Context.Expr[Unit]

  11. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  12. def breakUp(c: Context)(f: scala.reflect.macros.Context.Expr[Any]): Product with Serializable with Either[(scala.reflect.macros.Universe.Select, Tree, String, Tree, Tree, List[Tree]), (scala.reflect.macros.Universe.Select, scala.reflect.macros.Context.Expr[Any])]

  13. def browseObject(value: Any, pprinter: PPrinter, colors: CodeColors, command: (Int) ⇒ Strings): Unit

    Note: value must be a concrete, instantiated value with a concrete class, and cannot be an interface or abstract class.

    Note: value must be a concrete, instantiated value with a concrete class, and cannot be an interface or abstract class. We make use of line numbers from the bytecode to decide which source to show, and those only exist for concrete method implementations

  14. def browseObjectMember(symbolOwnerCls: Class[_], value: Any, memberName: String, pprinter: PPrinter, colors: CodeColors, command: (Int) ⇒ Strings, returnType: Class[_], argTypes: Class[_]*): Unit

    Note: value must be a concrete, instantiated value with a concrete class, and cannot be an interface or abstract class.

    Note: value must be a concrete, instantiated value with a concrete class, and cannot be an interface or abstract class. We make use of line numbers from the bytecode to decide which source to show, and those only exist for concrete method implementations

  15. def browseSource(loaded: Either[String, Location], verticalOffset: Int, colors: CodeColors, command: (Int) ⇒ Strings): Unit

  16. def browseSourceCommand(targetLine: Int): Seq[String]

  17. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def eq(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef → Any
  22. def getDesc(argTypes: Seq[Class[_]], returnType: Class[_]): String

  23. def getOffset(p: PPrinter): Int

    Pull the height from the pretty-printer as a heuristic to shift the desired line towards the middle of the screen.

    Pull the height from the pretty-printer as a heuristic to shift the desired line towards the middle of the screen. Typically, the pretty-printer's default height is about half the height of the window, so this centers the target line vertically. There is some random variation due to the way we're getting line numbers from bytecode, so hopefully centering it will help ensure the *actual* desired line is visible even if the line number we're aiming for is inaccurate

  24. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  25. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  26. def load(f: ⇒ Any): Location

    Annotations
    @macroImpl( ... )
  27. def loadCtClsMetadata(runtimeCls: Class[_], bytecode: Array[Byte]): CtClass

  28. def loadObjectInfo(value: Any): Either[String, Location]

  29. def loadObjectMemberInfo(symbolOwnerCls: Class[_], value: Any, memberName: String, returnType: Class[_], argTypes: Class[_]*): Either[String, Location]

    A hacky way to try and find a "good" source location for a function, about as good as we can probably get without a huge amount more effort:

    A hacky way to try and find a "good" source location for a function, about as good as we can probably get without a huge amount more effort:

    - We rely on the bytecode line numbers to locate methods; unfortunately, this only works for concrete, non-abstract methods! But it's the best we're going to get short of parsing all the source code ourselves

    - We look at the class that's the "owner" of the Scala symbol at compile time. This is based on the static type of the value; this *may* be an abstract method. If it's concrete, we can use it's bytecode line numbers to find it and we're done

    - If it's abstract, we then look at the class that's the java.reflect DeclaringClass of the value's method, at runtime. This may still not find the actual location (if the method comes from a trait, it'll give us the class implementing the trait, rather than the trait itself) but it gives us another chance at finding the concrete implementation.

    Again, this means it is important there is a concrete value that has the method we're looking for, since we're relying on the bytecode line numbers to find the method, which only exist in concrete methods.

  30. def loadSource(runtimeCls: Class[_], getLineNumber: (CtClass) ⇒ Either[String, Int]): Either[String, Location]

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

    Definition Classes
    AnyRef
  32. final def notify(): Unit

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

    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    AnyRef → Any
  36. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped