Package ghidra.program.model.symbol

# Interface ReferenceListener

public interface ReferenceListener
Interface to define methods that are called when references are added or removed.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `externalReferenceAdded(Reference ref)`
  Notification that the given external reference has been added.
  `void`
  `externalReferenceNameChanged(Reference ref)`
  Notification that the external program name in the reference has changed.
  `void`
  `externalReferenceRemoved(Reference ref)`
  Notification that the given external reference has been removed.
  `void`
  `memReferenceAdded(Reference ref)`
  Notification that the given memory reference has been added.
  `void`
  `memReferencePrimaryRemoved(Reference ref)`
  Notification that the given memory reference is no longer the primary reference.
  `void`
  `memReferencePrimarySet(Reference ref)`
  Notification that the given memory reference has been set as the primary reference.
  `void`
  `memReferenceRemoved(Reference ref)`
  Notification that the given memory reference has bee removed.
  `void`
  `memReferenceTypeChanged(Reference newRef, Reference oldRef)`
  Notification that the reference type on the given memory reference has changed.
  `void`
  `stackReferenceAdded(Reference ref)`
  Notification that the given stack reference has been added.
  `void`
  `stackReferenceRemoved(Reference ref)`
  Notification tbat the given stack reference has been removed.

- ## Method Details

  - ### memReferenceAdded

    void memReferenceAdded(Reference ref)
    Notification that the given memory reference has been added.
    Parameters:
      `ref` - the reference that was added.

  - ### memReferenceRemoved

    void memReferenceRemoved(Reference ref)
    Notification that the given memory reference has bee removed.
    Parameters:
      `ref` - the reference that was removed.

  - ### memReferenceTypeChanged

    void memReferenceTypeChanged(Reference newRef, Reference oldRef)
    Notification that the reference type on the given memory reference has changed.
    Parameters:
      `newRef` - the reference with the new reference type.
      `oldRef` - the reference with the old reference type.

  - ### memReferencePrimarySet

    void memReferencePrimarySet(Reference ref)
    Notification that the given memory reference has been set as the primary reference.
    Parameters:
      `ref` - the reference that is now primary.

  - ### memReferencePrimaryRemoved

    void memReferencePrimaryRemoved(Reference ref)
    Notification that the given memory reference is no longer the primary reference.
    Parameters:
      `ref` - the reference that was primary but now is not.

  - ### stackReferenceAdded

    void stackReferenceAdded(Reference ref)
    Notification that the given stack reference has been added.
    Parameters:
      `ref` - the stack reference that was added.

  - ### stackReferenceRemoved

    void stackReferenceRemoved(Reference ref)
    Notification tbat the given stack reference has been removed.
    Parameters:
      `ref` - The stack reference that was removed

  - ### externalReferenceAdded

    void externalReferenceAdded(Reference ref)
    Notification that the given external reference has been added.
    Parameters:
      `ref` - the external reference that was added.

  - ### externalReferenceRemoved

    void externalReferenceRemoved(Reference ref)
    Notification that the given external reference has been removed.
    Parameters:
      `ref` - the external reference that was removed.

  - ### externalReferenceNameChanged

    void externalReferenceNameChanged(Reference ref)
    Notification that the external program name in the reference has changed.
    Parameters:
      `ref` - the external reference with its new external name.