Class CRTData

java.lang.Object
com.ibm.wala.shrike.sourcepos.CRTData

public final class CRTData extends Object
This class represents an entry in the CharacterRangeTable.
Author:
Siegfried Weber, Juergen Graf <juergen.graf@gmail.com>
See Also:
  • Method Details

    • getFlags

      public CRTFlags getFlags()
    • isInRange

      public boolean isInRange(int pc)
      Tests whether the given index lies within the range of this data.
      Parameters:
      pc - the index to test
      Returns:
      whether the given index lies within the range of this data or not.
    • matches

      public boolean matches(CRTData d)
      Tests whether the given data is consistently with this data. To be consistently with another data this data has to be equal or more precise. Otherwise the datas are contradictory.
      Parameters:
      d - the data to test with
      Returns:
      whether the given data is consistently.
    • isMorePrecise

      public boolean isMorePrecise(CRTData d)
      Tests whether this data is equal to or more precise than the given data. This data is equal or more precise if the program counter range and the source range lie within the range of the given data. If this data or the parameter have no source positions, only program counter range decides.
      Parameters:
      d - the data to test with
      Returns:
      whether this data is equal to or more precise than the given one.
    • getSourceInfo

      public Range getSourceInfo()
      Returns the source positions.
      Returns:
      The returned array consists of four positions: the start line number, the start column number, the end line number, the end column number
    • toString

      public String toString()
      Overrides:
      toString in class Object