Class SourceCodePosition

java.lang.Object
de.hsh.graja.util.SourceCodePosition
All Implemented Interfaces:
Serializable

public class SourceCodePosition extends Object implements Serializable
A SourceCodePosition contains the position and character length of a code snippet of a single line
See Also:
  • Constructor Details

    • SourceCodePosition

      public SourceCodePosition(String filename, int line, int position, int length)
    • SourceCodePosition

      public SourceCodePosition(String filename, int line)
    • SourceCodePosition

      public SourceCodePosition(String filename, int line, int position, int length, boolean tabFormatted)
    • SourceCodePosition

      public SourceCodePosition(String filename, int line, boolean tabFormatted)
  • Method Details

    • getFileName

      public String getFileName()
    • getLine

      public int getLine()
    • getPosition

      public int getPosition()
    • getLength

      public int getLength()
    • isTabFormatted

      public boolean isTabFormatted()
      Returns:
      • true, when this position already counted the length of an occurred tab as tabwidth, defined in Verbatim.TABWIDTH
      • false, when this position assumes that an occured tab is 1 character long
    • tabFormatted

      public void tabFormatted()
    • setPosition

      public void setPosition(int line, int position, int length)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object other)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object