Class LocVal

  • All Implemented Interfaces:
    HostResult

    public class LocVal
    extends Val
    A trace location, which is a part of a trace entry.
    • Method Detail

      • getProgramName

        public String getProgramName()
        Returns the program name.
        Returns:
        the program name.
      • getProgramText

        public String getProgramText()
        Returns the program text.
        Returns:
        the program text.
      • getCharPos

        public int getCharPos()
        Returns the char index of the pos.
        Returns:
        the char index of the pos.
      • getRunePos

        public int getRunePos()
        Returns the rune index of the pos.
        Returns:
        the rune index of the pos.
      • getLineNum

        public int getLineNum()
        Returns the one-based line number of the loc on the program text.
        Returns:
        the one-based line number of the loc on the program text.
      • getColumnCharOffset

        public int getColumnCharOffset()
        Returns the char offset from the head of the line.
        Returns:
        the char offset from the head of the line.
      • getColumnRuneOffset

        public int getColumnRuneOffset()
        Returns the rune offset from the head of the line.
        Returns:
        the rune offset from the head of the line.
      • getLine

        public String getLine()
        Returns the line string where the loc is located.
        Returns:
        the line string where the loc is located.
      • getIndicator

        public String getIndicator()
        Returns the string of Trace.indicator. The example result: "foo(-->bar)".
        Returns:
        the string of Trace.indicator.
      • getDesc

        public String getDesc()
        Returns the string of Trace.desc. The example result: "foo.kn L10 C15".
        Returns:
        the string of Trace.desc.
      • toString

        public String toString()
        Returns the string representation of the loc val.
        Overrides:
        toString in class Object
        Returns:
        the string representation of the loc val.
      • hashCode

        public int hashCode()
        Returns the hash code of the loc val.
        Overrides:
        hashCode in class Object
        Returns:
        the hash code of the loc val.
      • equals

        public boolean equals​(Object arg)
        Returns true if the two locs have the same vms, program names, program texts and pos indices.
        Overrides:
        equals in class Object
        Parameters:
        arg - the argument to compare to.
        Returns:
        true if the two locs are equal.
      • getCustomVarMapping

        public VarMapping getCustomVarMapping()
        Description copied from class: Val
        Returns the var mapping for a val class.

        Override this method to provide vars common to the val class. The content of the var mapping is preferred than the common ones.

        Overrides:
        getCustomVarMapping in class Val
        Returns:
        the var mapping for a val class.