Location

data class Location(val base: String, val path: String, val line: Int = -1, val column: Int = -1)

Locates a .proto file, or a position within a .proto file, on the file system. This includes a base directory or a .jar file, and a path relative to that base.

Constructors

Link copied to clipboard
constructor(base: String, path: String, line: Int = -1, column: Int = -1)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The base of this location; typically a directory or .jar file.

Link copied to clipboard
val column: Int

The column on the line of this location, or -1 for no specific column.

Link copied to clipboard
val line: Int

The line number of this location, or -1 for no specific line number.

Link copied to clipboard

The path to this location relative to base.

Functions

Link copied to clipboard
fun at(line: Int, column: Int): Location
Link copied to clipboard
open override fun toString(): String
Link copied to clipboard

Returns a copy of this location with an empty base.

Link copied to clipboard

Returns a copy of this location including only its path.