Package ghidra.program.util

# Class VariableTypeFieldLocation

java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.VariableLocation
ghidra.program.util.VariableTypeFieldLocation

All Implemented Interfaces:
  `Cloneable`, `Comparable<ProgramLocation>`

public class VariableTypeFieldLocation extends VariableLocation
The `VariableTypeFieldLocation` class provides specific information about the variable type field within a program location.

- ## Field Summary

  ### Fields inherited from class ghidra.program.util.FunctionLocation

  `functionAddr`

  ### Fields inherited from class ghidra.program.util.ProgramLocation

  `addr, program, refAddr`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `VariableTypeFieldLocation()`
  Should only be used by XML restoration.
  `VariableTypeFieldLocation(Program program, Address locationAddr, Variable var, int charOffset)`
  Construct a new VariableTypeFieldLocation object.
  `VariableTypeFieldLocation(Program program, Variable var, int charOffset)`
  Construct a new VariableTypeFieldLocation object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getType()`
  Return the function stack variable type string at this location.
  `int`
  `hashCode()`
  `void`
  `restoreState(Program p, SaveState obj)`
  Restore this function location using the given program and save state object.
  `void`
  `saveState(SaveState obj)`
  Save this function location to the given save state object.
  `String`
  `toString()`
  Returns a String representation of this location.

  ### Methods inherited from class ghidra.program.util.VariableLocation

  `compareTo, getVariable, isLocationFor, isParameter, isReturn, isValid`

  ### Methods inherited from class ghidra.program.util.FunctionLocation

  `getFunctionAddress`

  ### Methods inherited from class ghidra.program.util.ProgramLocation

  `clone, compareAddr, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy`

  ### Methods inherited from class java.lang.Object

  `finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### VariableTypeFieldLocation

    public VariableTypeFieldLocation(Program program, Address locationAddr, Variable var, int charOffset)
    Construct a new VariableTypeFieldLocation object.
    Parameters:
      `program` - the program of the location
      `locationAddr` - the address of the listing location (i.e., referent code unit)
      `var` - the variable associated with this type field location.
      `charOffset` - the position within the function name string for this location.

  - ### VariableTypeFieldLocation

    public VariableTypeFieldLocation(Program program, Variable var, int charOffset)
    Construct a new VariableTypeFieldLocation 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 associated with this type field location.
      `charOffset` - the position within the function name string for this location.

  - ### VariableTypeFieldLocation

    public VariableTypeFieldLocation()
    Should only be used by XML restoration.

- ## Method Details

  - ### getType

    public String getType()
    Return the function stack variable type string at this location.

  - ### toString

    public String toString()
    Returns a String representation of this location.
    Overrides:
      `toString` in class `VariableLocation`

  - ### 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