Package ghidra.program.model.symbol

# Class ThunkReference

java.lang.Object
ghidra.program.model.symbol.ThunkReference

All Implemented Interfaces:
  `DynamicReference`, `Reference`, `Comparable<Reference>`

public class ThunkReference extends Object implements DynamicReference
Implementation for a Thunk Function reference. These references are dynamic in nature and may not be explicitly added, removed or altered. There presence is inferred by the existence of a thunk function.

- ## Field Summary

  ### Fields inherited from interface ghidra.program.model.symbol.Reference

  `MNEMONIC, OTHER`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ThunkReference(Address thunkAddr, Address thunkedAddr)`
  Thunk reference constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(Reference ref)`
  `boolean`
  `equals(Object obj)`
  `Address`
  `getFromAddress()`
  Returns Get the address of the code unit that is making the reference..
  `int`
  `getOperandIndex()`
  Get the operand index of where this reference was placed.
  `RefType`
  `getReferenceType()`
  Returns Get the type of reference being made..
  `SourceType`
  `getSource()`
  Gets the source of this reference.
  `long`
  `getSymbolID()`
  Get the symbol ID associated with this reference.
  `Address`
  `getToAddress()`
  Returns Get the "to" address for this reference..
  `boolean`
  `isEntryPointReference()`
  Returns Returns true if this reference is an instance of EntryReference..
  `boolean`
  `isExternalReference()`
  Returns Returns true if this reference is an instance of ExternalReference..
  `boolean`
  `isMemoryReference()`
  Returns Returns true if this reference to an address in the programs memory space. This includes offset and shifted references..
  `boolean`
  `isMnemonicReference()`
  Returns Return true if this reference is on the Mnemonic and not on an operand..
  `boolean`
  `isOffsetReference()`
  Returns Returns true if this reference is an instance of OffsetReference..
  `boolean`
  `isOperandReference()`
  Returns Return true if this reference is on an operand and not on the Mnemonic..
  `boolean`
  `isPrimary()`
  Returns Return whether this reference is marked as primary..
  `boolean`
  `isRegisterReference()`
  Returns Returns true if this reference to an address in the programs register space..
  `boolean`
  `isShiftedReference()`
  Returns Returns true if this reference is an instance of ShiftedReference..
  `boolean`
  `isStackReference()`
  Returns Returns true if this reference is an instance of StackReference and refers to a stack location..

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

  `clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ThunkReference

    public ThunkReference(Address thunkAddr, Address thunkedAddr)
    Thunk reference constructor
    Parameters:
      `thunkAddr` - thunk function address
      `thunkedAddr` - "thunked" function address

- ## Method Details

  - ### getFromAddress

    public Address getFromAddress()
    Description copied from interface: `Reference`
    Returns Get the address of the code unit that is making the reference..
    Specified by:
      `getFromAddress` in interface `Reference`
    Returns:
      Get the address of the code unit that is making the reference.
    See Also:
      - `Reference.getFromAddress()`

  - ### getToAddress

    public Address getToAddress()
    Description copied from interface: `Reference`
    Returns Get the "to" address for this reference..
    Specified by:
      `getToAddress` in interface `Reference`
    Returns:
      Get the "to" address for this reference.
    See Also:
      - `Reference.getToAddress()`

  - ### isPrimary

    public boolean isPrimary()
    Description copied from interface: `Reference`
    Returns Return whether this reference is marked as primary..
    Specified by:
      `isPrimary` in interface `Reference`
    Returns:
      Return whether this reference is marked as primary.
    See Also:
      - `Reference.isPrimary()`

  - ### getSymbolID

    public long getSymbolID()
    Description copied from interface: `Reference`
    Get the symbol ID associated with this reference. Applies to memory references only.
    Specified by:
      `getSymbolID` in interface `Reference`
    Returns:
      symbol ID or -1 if no symbol is associated with this reference
    See Also:
      - `Reference.getSymbolID()`

  - ### getReferenceType

    public RefType getReferenceType()
    Description copied from interface: `Reference`
    Returns Get the type of reference being made..
    Specified by:
      `getReferenceType` in interface `Reference`
    Returns:
      Get the type of reference being made.
    See Also:
      - `Reference.getReferenceType()`

  - ### getOperandIndex

    public int getOperandIndex()
    Description copied from interface: `Reference`
    Get the operand index of where this reference was placed.
    Specified by:
      `getOperandIndex` in interface `Reference`
    Returns:
      op index or ReferenceManager.MNEMONIC
    See Also:
      - `Reference.getOperandIndex()`

  - ### isMnemonicReference

    public boolean isMnemonicReference()
    Description copied from interface: `Reference`
    Returns Return true if this reference is on the Mnemonic and not on an operand..
    Specified by:
      `isMnemonicReference` in interface `Reference`
    Returns:
      Return true if this reference is on the Mnemonic and not on an operand.
    See Also:
      - `Reference.isMnemonicReference()`

  - ### isOperandReference

    public boolean isOperandReference()
    Description copied from interface: `Reference`
    Returns Return true if this reference is on an operand and not on the Mnemonic..
    Specified by:
      `isOperandReference` in interface `Reference`
    Returns:
      Return true if this reference is on an operand and not on the Mnemonic.
    See Also:
      - `Reference.isOperandReference()`

  - ### compareTo

    public int compareTo(Reference ref)
    Specified by:
      `compareTo` in interface `Comparable<Reference>`
    See Also:
      - `Comparable.compareTo(Object)`

  - ### equals

    public boolean equals(Object obj)
    Overrides:
      `equals` in class `Object`
    See Also:
      - `Object.equals(Object)`

  - ### isExternalReference

    public boolean isExternalReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference is an instance of ExternalReference..
    Specified by:
      `isExternalReference` in interface `Reference`
    Returns:
      Returns true if this reference is an instance of ExternalReference.
    See Also:
      - `Reference.isExternalReference()`

  - ### isOffsetReference

    public boolean isOffsetReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference is an instance of OffsetReference..
    Specified by:
      `isOffsetReference` in interface `Reference`
    Returns:
      Returns true if this reference is an instance of OffsetReference.
    See Also:
      - `Reference.isOffsetReference()`

  - ### isShiftedReference

    public boolean isShiftedReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference is an instance of ShiftedReference..
    Specified by:
      `isShiftedReference` in interface `Reference`
    Returns:
      Returns true if this reference is an instance of ShiftedReference.
    See Also:
      - `Reference.isShiftedReference()`

  - ### isEntryPointReference

    public boolean isEntryPointReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference is an instance of EntryReference..
    Specified by:
      `isEntryPointReference` in interface `Reference`
    Returns:
      Returns true if this reference is an instance of EntryReference.
    See Also:
      - `Reference.isEntryPointReference()`

  - ### isMemoryReference

    public boolean isMemoryReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference to an address in the programs memory space. This includes offset and shifted references..
    Specified by:
      `isMemoryReference` in interface `Reference`
    Returns:
      Returns true if this reference to an address in the programs memory space. This includes offset and shifted references.
    See Also:
      - `Reference.isMemoryReference()`

  - ### isRegisterReference

    public boolean isRegisterReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference to an address in the programs register space..
    Specified by:
      `isRegisterReference` in interface `Reference`
    Returns:
      Returns true if this reference to an address in the programs register space.
    See Also:
      - `Reference.isRegisterReference()`

  - ### isStackReference

    public boolean isStackReference()
    Description copied from interface: `Reference`
    Returns Returns true if this reference is an instance of StackReference and refers to a stack location..
    Specified by:
      `isStackReference` in interface `Reference`
    Returns:
      Returns true if this reference is an instance of StackReference and refers to a stack location.
    See Also:
      - `Reference.isStackReference()`

  - ### getSource

    public SourceType getSource()
    Description copied from interface: `Reference`
    Gets the source of this reference. `SourceType`s
    Specified by:
      `getSource` in interface `Reference`
    Returns:
      the source of this reference