Class AddressFieldLocation

  • All Implemented Interfaces:
    java.lang.Comparable<ProgramLocation>

    public class AddressFieldLocation
    extends CodeUnitLocation
    The AddressFieldLocation class provides specific information about a program location within the ADDRESS field.
    • Constructor Detail

      • AddressFieldLocation

        public AddressFieldLocation​(Program program,
                                    Address addr,
                                    int[] componentPath,
                                    java.lang.String addrRepresentation,
                                    int charOffset)
        Construct a new AddressFieldLocation object with the standard string representation and a position within that string.
        Parameters:
        program - the program of the location
        addr - address of the location
        componentPath - if not null, it is the array of indexes that point to a specific data type inside of another data type
        addrRepresentation - the string representation of the address
        charOffset - the position into the string representation indicating the exact position within the Address Field.
      • AddressFieldLocation

        public AddressFieldLocation​(Program program,
                                    Address addr)
        Construct a new default AddressFieldLocation for a given program address.
        Parameters:
        program - the program of the location
        addr - address of the location
      • AddressFieldLocation

        public AddressFieldLocation()
        Default constructor needed for restoring an address field location from XML.
    • Method Detail

      • getAddressRepresentation

        public java.lang.String getAddressRepresentation()
        Returns the standard string representation of the address in the address field. If there is no address, then null should be returned.
      • toString

        public java.lang.String toString()
        Returns a String representation of this location.
        Overrides:
        toString in class ProgramLocation
      • saveState

        public void saveState​(SaveState obj)
        Description copied from class: ProgramLocation
        Save this program location to the given save state object.
        Overrides:
        saveState in class ProgramLocation
        Parameters:
        obj - the save state object for saving the location
      • restoreState

        public void restoreState​(Program restoreProgram,
                                 SaveState obj)
        Description copied from class: ProgramLocation
        Restore this program location using the given program and save state object.
        Overrides:
        restoreState in class ProgramLocation
        Parameters:
        restoreProgram - program to restore from
        obj - the save state to restore from