Class LabelFieldLocation

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

    public class LabelFieldLocation
    extends CodeUnitLocation
    The LableFieldLocation class contains specific location information within the LABEL field of a CodeUnitLocation object.
    • Constructor Detail

      • LabelFieldLocation

        public LabelFieldLocation()
        Default constructor needed for restoring a label field location from XML
      • LabelFieldLocation

        public LabelFieldLocation​(Program program,
                                  Address addr,
                                  int[] componentPath,
                                  java.lang.String label,
                                  Namespace namespace,
                                  int row,
                                  int charOffset)
        Construct a new LabelFieldLocation.
        Parameters:
        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
        label - the label String at this location.
        row - the row in list of labels as displayed by the label field. Only used for program location comparison purposes.
        charOffset - the column position within the label string for this location.
      • LabelFieldLocation

        public LabelFieldLocation​(Program program,
                                  Address addr,
                                  java.lang.String label)
        Construct a new LabelFieldLocation where the namespace is global, primary is false, and the cursor location is at row 0, column 0;
        Parameters:
        program - the program of the location.
        addr - the address of the location.
        label - the name of the symbol for this label location.
      • LabelFieldLocation

        public LabelFieldLocation​(Program program,
                                  Address addr,
                                  java.lang.String label,
                                  Namespace namespace,
                                  int row)
        Construct a new LabelFieldLocation.

        Parameters:
        program - the program of the location.
        addr - address of the location; should not be null
        label - the label String at this location.
        namespace - the namespace for the label. Null will default to the global namespace.
        row - the row in list of labels as displayed by the label field. Only used for program location comparison purposes.
      • LabelFieldLocation

        public LabelFieldLocation​(Symbol s)
        Creates a label field location using the specified symbol and an index of 0.
        Parameters:
        s - the symbol to use when creating the location
      • LabelFieldLocation

        public LabelFieldLocation​(Symbol s,
                                  int row,
                                  int charOffset)
        Creates a label field location using the specified symbol and the specified field index.
        Parameters:
        s - the symbol to use when creating the location
        row - the row of the symbol.
        charOffset - the position within the label string for this location
    • Method Detail

      • getName

        public java.lang.String getName()
        Return the label string at this location.
      • getSymbol

        public Symbol getSymbol()
        Returns the symbol at this LabelFieldLocation NOTE: currently a null symbol will be returned for default thunk functions
        Returns:
        the symbol at this LabelFieldLocation or null if symbol lookup fails
      • getSymbolPath

        public SymbolPath getSymbolPath()
        Returns the symbol path which corresponds to the label location
        Returns:
        symbol path
      • 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