Class VariableCommentFieldLocation

All Implemented Interfaces:
Cloneable, Comparable<ProgramLocation>

public class VariableCommentFieldLocation extends VariableLocation
The VariableCommentFieldLocation class provides specific information about the stack variable comment field within a program location.
  • Constructor Details

    • VariableCommentFieldLocation

      public VariableCommentFieldLocation(Program program, Address locationAddr, Variable var, int charOffset)
      Construct a new VariableCommentFieldLocation object.
      Parameters:
      program - the program of the location
      locationAddr - the address of the listing location (i.e., referent code unit)
      var - the variable which has its comment in the field.
      charOffset - the position within the variable comment string for this location.
    • VariableCommentFieldLocation

      public VariableCommentFieldLocation(Program program, Variable var, int charOffset)
      Construct a new VariableCommentFieldLocation object. Variable function entry point is the assumed listing location (i.e., referent code unit). Care should be taken if variable corresponds to an EXTERNAL function.
      Parameters:
      program - the program of the location
      var - the variable which has its comment in the field.
      charOffset - the position within the variable comment string for this location.
    • VariableCommentFieldLocation

      public VariableCommentFieldLocation()
      Should only be used by XML restoration.
  • Method Details

    • getComment

      public String getComment()
      Return the function variable comment string at this location.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ProgramLocation
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class VariableLocation
    • restoreState

      public void restoreState(Program p, SaveState obj)
      Description copied from class: FunctionLocation
      Restore this function location using the given program and save state object.
      Overrides:
      restoreState in class VariableLocation
      Parameters:
      p - the program containing the function location
      obj - the save state object for saving the location
    • saveState

      public void saveState(SaveState obj)
      Description copied from class: FunctionLocation
      Save this function location to the given save state object.
      Overrides:
      saveState in class VariableLocation
      Parameters:
      obj - the save state object for saving the location