checkers.flow
Class Location

java.lang.Object
  extended by checkers.flow.Location

public final class Location
extends Object

Represents the location of a Tree. A tree's location may be uniquely identified by its source position (character offset) and Tree.Kind. Source position alone is not sufficient, since many trees may share the same source position (for instance, the member select "a.b" and the identifier "a" in that select have the same source position, but different kinds).

See Also:
for determining a tree's source position (character offset)

Constructor Summary
Location(long position, Tree tree)
          Creates a new Location from a position and Tree.Kind.
 
Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

public Location(long position,
                Tree tree)
Creates a new Location from a position and Tree.Kind.

Positions can be obtained from a tree using the SourcePositions class.

Parameters:
position - the tree's position
tree - the tree's kind
See Also:
SourcePositions
Method Detail

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object