Location

class Location

Location.

Location provides information where something happened. Because it is not cheap to resolve that in Java, it uses lazy evaluation.

The location is usually used in the following way:

void firstMethod(Location loc)
{
    secondMethod(loc.up());
}

void secondMethod(Location loc)
{
    locationMethod(loc.up());
}

void locationMethod(Location loc)
{
    loc.toString(); // Location of caller
}

void caller()
{
    firstMethod(new Location());
}

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Resolve the location.
Link copied to clipboard
open fun toString(): String
Return string representation of this location.
Link copied to clipboard
open fun up(): Location
Get one location up.
open fun up(up: Int): Location
Get location up.