Dotty Documentation

0.1.1-bin-SNAPSHOT

case class SourceFile
extends SourceFile with Product

[-] Constructors

SourceFile ( file: AbstractFile , content: Array [ Char ] )
SourceFile ( _file: AbstractFile , codec: Codec )
SourceFile ( sourceName: String , cs: Seq [ Char ] )
SourceFile ( file: AbstractFile , cs: Seq [ Char ] )

[-] Members

[+] val content : Array [ Char ]
[+] val file : AbstractFile
[+] private var lastLine : Int

A cache to speed up offsetToLine searches to similar lines

[+] val length : Int
[+] private lazy val lineIndices : Array [ Int ]
[+] def apply ( idx: Int ) : T
[+] def atPos ( pos: Position ) : SourcePosition
[+] private def calculateLineIndices ( cs: Array [ Char ] ) : Array [ Int ]
[+] def column ( offset: Int ) : Int

The column corresponding to offset, starting at 0

[+] override def equals ( that: Any ) : Boolean
[+] def exists : Boolean

true for all source files except NoSource

[+] override def hashCode : Int
[+] private def isLineBreak ( idx: Int ) : Boolean
[+] def isSelfContained : Boolean
[+] override def jfile : Optional [ File ]
[+] private def lastLine_= ( x$1: Int ) : Unit

A cache to speed up offsetToLine searches to similar lines

[+] def lineContent ( offset: Int ) : String

The content of the line containing position offset

[+] def lineToOffset ( index: Int ) : Int

Map line to offset of first character in line

[+] override def name : String
[+] def nextLine ( offset: Int ) : Int

The start index of the line following the one containing position offset

[+] def offsetToLine ( offset: Int ) : Int

Convert offset to line in this source file Lines are numbered from 0

[+] override def path : String
[+] def positionInUltimateSource ( position: SourcePosition ) : SourcePosition

Map a position to a position in the underlying source file. For regular source files, simply return the argument.

[+] def start : Int

The start of this file in the underlying source file

[+] def startColumnPadding ( offset: Int ) : String

The padding of the column corresponding to offset, includes tabs

[+] def startOfLine ( offset: Int ) : Int

The index of the first character of the line containing position offset

[+] def tabInc : Int

Tab increment; can be overridden

[+] override def toString : String
[+] def underlying : SourceFile

The underlying source file