Class ContextLocation

java.lang.Object
org.pgcodekeeper.core.ContextLocation
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AntlrError, PgObjLocation

public abstract class ContextLocation extends Object implements Serializable
Represents a location context within a file, storing position information including file path, offset, line number and character position.

This is an abstract base class for concrete location implementations.

See Also:
  • Method Details

    • getFilePath

      public String getFilePath()
    • getOffset

      public int getOffset()
    • getLineNumber

      public int getLineNumber()
    • getCharPositionInLine

      public int getCharPositionInLine()
    • equals

      public boolean equals(Object obj)
      Compares this location with another object for equality.
      Overrides:
      equals in class Object
      Parameters:
      obj - the object to compare with
      Returns:
      true if the other object is a ContextLocation with identical file path, offset, line number and character position
    • hashCode

      public int hashCode()
      Computes a hash code based on all location attributes.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this location