final class Position
extends AnyVal

A position indicates a range between a start offset and an end offset. Positions can be synthetic or source-derived. A source-derived position has in addition a point lies somewhere between start and end. The point is roughly where the ^ would go if an error was diagnosed at that position. All quantities are encoded opaquely in a Long.

Constructors

Position ( coords: Long )
Position ( encoding: Int )
Position ( source: SourceFile , pos: Position , outer: SourcePosition )

Members

val coords : Long
def beforeAndAfterPoint : ( List [ Int ], List [ Int ] )
def canEqual ( that: Any ) : Boolean
def clone ( ) : Object
def column : Int

The column of the position, starting at 0

The column of the position, starting at 0

def contains ( that: Position ) : Boolean

Does the range of this position contain the one of that position?

Does the range of this position contain the one of that position?

def end : Int

The end of this position

The end of this position

def end : Int
def endColumn : Int
def endLine : Int
def endPos : Position

The zero-extent position with start and end at the end of this position

The zero-extent position with start and end at the end of this position

def eq ( x$0: Object ) : Boolean
def exists : Boolean

Is this position different from NoPosition?

Is this position different from NoPosition?

def exists : Boolean
def finalize ( ) : Unit
def focus : Position

The zero-extent position with start and end at the point of this position

The zero-extent position with start and end at the point of this position

def isIndex : Boolean
def isPosition : Boolean
def isSourceDerived : Boolean

Is this position source-derived?

Is this position source-derived?

def isSynthetic : Boolean

Is this position synthetic?

Is this position synthetic?

def line : Int

The line of the position, starting at 0

The line of the position, starting at 0

def lineContent : String
def lineOffsets : List [ Int ]
def lines : List [ Int ]

The lines of the position

The lines of the position

def linesSlice : Array [ Char ]

Extracts the lines from the underlying source file as Array[Char]

Extracts the lines from the underlying source file as Array[Char]

def ne ( x$0: Object ) : Boolean
def notify ( ) : Unit
def notifyAll ( ) : Unit
def orElse ( that: Position ) : Position
def point : Int

The point of this position, returns start for synthetic positions

The point of this position, returns start for synthetic positions

def point : Int
def pointDelta : Int

The difference between point and start in this position

The difference between point and start in this position

def productArity : Int
@throws def productElement ( n: Int ) : Any
def productIterator : Iterator [ Any ]
def productPrefix : String
def shift ( offset: Int ) : Position

A position where all components are shifted by a given offset relative to this position.

A position where all components are shifted by a given offset relative to this position.

def start : Int

The start of this position.

The start of this position.

def start : Int
def startColumn : Int
def startLine : Int
def startPos : Position

The zero-extent position with start and end at the start of this position

The zero-extent position with start and end at the start of this position

def synchronized ( x$0: X0 ) : X0
def toIndex : Int
def toPosition : Position
override def toString : String
def toString : String
def toSynthetic : Position

A synthetic copy of this position

A synthetic copy of this position

def union ( that: Position ) : Position

The union of two positions. This is the least range that encloses both positions. It is always a synthetic position.

The union of two positions. This is the least range that encloses both positions. It is always a synthetic position.

def wait ( ) : Unit
def wait ( x$0: Long , x$1: Int ) : Unit
def wait ( x$0: Long ) : Unit
def withEnd ( end: Int ) : Position

A copy of this position with a different end

A copy of this position with a different end

def withOuter ( outer: SourcePosition ) : SourcePosition
def withPoint ( point: Int ) : Position

A copy of this position with a different point

A copy of this position with a different point

def withStart ( start: Int ) : Position

A copy of this position with a different start

A copy of this position with a different start