Class ProgramLocation

    • Field Detail

      • program NEW

        protected Program program
      • refAddr NEW

        protected Address refAddr

Constructor Detail

  • Method Detail

    • getComponentPath

      public int[] getComponentPath()
      Returns the componentPath for the codeUnit. Null will be returned if the object is an Instruction or a top-level Data object.
    • getProgram

      public Program getProgram()
      Returns program associated with location or null if not specified.
    • getAddress

      public Address getAddress()
      Returns the address associated with this location.
      Note: this may not be the same as the byte address. For example, in a code unit location this may be the minimum address of the code unit that contains the byte address.
    • getByteAddress

      public Address getByteAddress()
      Returns the byte level address associated with this location.
    • getRefAddress

      public Address getRefAddress()
      Returns the "referred to" address if the location is over an address in some field.
    • saveState

      public void saveState​(SaveState obj)
      Save this program location to the given save state object.
      Parameters:
      obj - the save state object for saving the location
      prefix - prefix appended to the names of the save state items to make the entry unique
    • restoreState

      public void restoreState​(Program program1,
                               SaveState obj)
      Restore this program location using the given program and save state object.
      Parameters:
      prefix - prefix appended to the names of the save state items to make the entry unique
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

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

      public boolean equals​(java.lang.Object obj)
      Overrides:
      equals in class java.lang.Object
    • compareAddr NEW

      protected static int compareAddr​(Address addr1,
                                       Address addr2)
    • isValid

      public boolean isValid​(Program testProgram)
      Returns true if this location represents a valid location in the given program
      Parameters:
      testProgram - the program to test if this location is valid.
      Returns:
      true if this location represents a valid location in the given program
    • getRow

      public int getRow()
      Returns the row within the program location.
      Returns:
      the row within the program location.
    • getCharOffset

      public int getCharOffset()
      Returns the character offset in the display item at the (row,col)
      Returns:
      the character offset in the display item at the (row,col)
    • getColumn

      public int getColumn()
      Returns the column index of the display piece represented by this location. For most locations, there is only one display item per row, in which case this value will be 0.