Util

ammonite.util.Util$
object Util

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Util.type

Members list

Concise view

Type members

Classlikes

case class CodeSource(wrapperName: Name, flexiblePkgName: Seq[Name], pkgRoot: Seq[Name], path: Option[Path])

Information about where a particular block of code came from; path is optional because some code snippets are synthetic, which means any filename is entirely synthetic and $file imports do not work in them. However, there are many snippets of code, e.g. repl commands and such, which have a "fake" path because we want to allow $file imports relative to some path or working-directory

Information about where a particular block of code came from; path is optional because some code snippets are synthetic, which means any filename is entirely synthetic and $file imports do not work in them. However, there are many snippets of code, e.g. repl commands and such, which have a "fake" path because we want to allow $file imports relative to some path or working-directory

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class Location(fileName: String, lineNum: Int, fileContent: String)

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class VersionedWrapperId(wrapperPath: String, tag: Tag)

Refers to a wrapper object compiled with a specific set of source code and enclosing environment (encapsulated in the hashVal). This lets us unambiguously look up the correct version of a class, or invalidate and recompile it if the source code or environment changes

Refers to a wrapper object compiled with a specific set of source code and enclosing environment (encapsulated in the hashVal). This lets us unambiguously look up the correct version of a class, or invalidate and recompile it if the source code or environment changes

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Types

type ClassFiles = Vector[(String, Array[Byte])]

Value members

Concrete methods

def encodeFilePath(path: Seq[Name]): Seq[String]
def encodeJvmPath(path: Seq[Name]): String
def encodeScalaSourcePath(path: Seq[Name]): String
def isInteractive(): Boolean

Detects if the console is interactive; lets us make console-friendly output (e.g. ansi color codes) if it is, and script-friendly output (no ansi codes) if it's not

Detects if the console is interactive; lets us make console-friendly output (e.g. ansi color codes) if it is, and script-friendly output (no ansi codes) if it's not

https://stackoverflow.com/a/1403817/871202

Attributes

def lookupWhiteList(whitelist: Set[Seq[String]], tokens: Seq[String]): Boolean
def md5Hash(data: Iterator[Array[Byte]]): Array[Byte]
def normalizeNewlines(s: String): String
def pathToPackageWrapper(flexiblePkgName0: Seq[Name], relPath0: RelPath): (Seq[Name], Name)
def transpose[A](xs: List[List[A]]): List[List[A]]
def withContextClassloader[T](contextClassloader: ClassLoader)(t: => T): T

Concrete fields

val java9OrAbove: Boolean
val javaPrefixes: Set[String]
val newLine: String
val upPathSegment: String
val windowsPlatform: Boolean