Class MnemonicFieldLocation

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

    public class MnemonicFieldLocation
    extends CodeUnitLocation
    The MnemonicFieldLocation class contains specific location information within the MNEMONIC field of a CodeUnitLocation object.
    • Constructor Detail

      • MnemonicFieldLocation

        public MnemonicFieldLocation​(Program program,
                                     Address addr,
                                     int[] componentPath,
                                     java.lang.String mnemonicString,
                                     int charOffset)
        Construct a new MnemonicFieldLocation.
        Parameters:
        program - the program of the location
        addr - address of the location; should not be null
        componentPath - array of indexes for each nested data component; the index is the data component's index within its parent; may be null
        mnemonicString - the mnemonic string
        charOffset - the character position within the mnemonic string for this location.
      • MnemonicFieldLocation

        public MnemonicFieldLocation​(Program program,
                                     Address addr,
                                     Address refAddr,
                                     int[] componentPath,
                                     java.lang.String mnemonicString,
                                     int charOffset)
        Construct a new MnemonicFieldLocation.
        Parameters:
        program - the program of the location
        addr - address of the location; should not be null
        refAddr - the "referred to" address if the location is over a reference; may be null
        componentPath - array of indexes for each nested data component; the index is the data component's index within its parent; may be null
        mnemonicString - the mnemonic string
        charOffset - the character position within the mnemonic string for this location.
      • MnemonicFieldLocation

        public MnemonicFieldLocation()
        Default constructor needed for restoring a mnemonic field location from XML.
    • Method Detail

      • getMnemonic

        public java.lang.String getMnemonic()
        Returns the mnemonic string at this location.
      • toString

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

        public void restoreState​(Program p,
                                 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:
        p - program to restore from
        obj - the save state to restore from
      • 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