Package ghidra.program.util

# Class FunctionNameFieldLocation

java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.FunctionSignatureFieldLocation
ghidra.program.util.FunctionNameFieldLocation

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

Direct Known Subclasses:
  `FunctionNameDecompilerLocation`

public class FunctionNameFieldLocation extends FunctionSignatureFieldLocation
The `FunctionNameFieldLocation` class provides specific information about the Function Name 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
  `FunctionNameFieldLocation()`
  Default constructor needed for restoring a program location from XML
  `FunctionNameFieldLocation(Program program, Address functionAddr, int col, String signature, String functionName)`
  Construct a new FunctionNameFieldLocation object.
  `FunctionNameFieldLocation(Program program, Address locationAddr, Address functionAddr, int charOffset, String signature, String functionName)`
  Construct a new FunctionNameFieldLocation object.
  `FunctionNameFieldLocation(Program program, Address addr, String functionName)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  `String`
  `getFunctionName()`
  `int`
  `hashCode()`
  `void`
  `restoreState(Program restoreProgram, 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.FunctionSignatureFieldLocation

  `getSignature, isFieldBasedPositioning`

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

  `getFunctionAddress, isValid`

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

  `clone, compareAddr, compareTo, 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

  - ### FunctionNameFieldLocation

    public FunctionNameFieldLocation(Program program, Address locationAddr, Address functionAddr, int charOffset, String signature, String functionName)
    Construct a new FunctionNameFieldLocation object.
    Parameters:
      `program` - the program of the location
      `locationAddr` - the address of the listing location (i.e., referent code unit)
      `functionAddr` - the function address
      `charOffset` - the position within the function signature string for this location.
      `signature` - the function signature string for this location.
      `functionName` - the function name String at this location.

  - ### FunctionNameFieldLocation

    public FunctionNameFieldLocation(Program program, Address functionAddr, int col, String signature, String functionName)
    Construct a new FunctionNameFieldLocation object.
    Parameters:
      `program` - the program of the location
      `functionAddr` - the function address
      `col` - the position within the function signature string for this location.
      `signature` - the function signature string for this location.
      `functionName` - the function name String at this location.

  - ### FunctionNameFieldLocation

    public FunctionNameFieldLocation(Program program, Address addr, String functionName)

  - ### FunctionNameFieldLocation

    public FunctionNameFieldLocation()
    Default constructor needed for restoring a program location from XML

- ## Method Details

  - ### getFunctionName

    public String getFunctionName()

  - ### toString

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

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `FunctionSignatureFieldLocation`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `FunctionSignatureFieldLocation`

  - ### 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 `FunctionSignatureFieldLocation`
    Parameters:
      `obj` - the save state object for saving the location

  - ### restoreState

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