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());
}
Content copied to clipboard