case class SourceFile
extends SourceFile

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

A cache to speed up offsetToLine searches to similar lines

[+] val length : Int
[+] private lazy val lineIndices : Array [ Int ]
[+] def _1 : T1
[+] def _2 : T2
[+] 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

The column corresponding to offset, starting at 0

[+] def copy ( file: AbstractFile , content: Array [ Char ] ) : SourceFile
[+] def copy$default$1 : AbstractFile
[+] def copy$default$2 : Array [ Char ]
[+] override def equals ( that: Any ) : Boolean
[+] def exists : Boolean

true for all source files except NoSource

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

A cache to speed up offsetToLine searches to similar lines

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

The content of the line containing position offset

The content of the line containing position offset

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

Map line to offset of first character in line

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

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

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.

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

The start of this file in the underlying source file

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

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

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

[+] def tabInc : Int

Tab increment; can be overridden

Tab increment; can be overridden

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

The underlying source file

The underlying source file