Package ghidra.trace.database.program

# Class DBTraceProgramViewEquate

java.lang.Object
ghidra.trace.database.program.DBTraceProgramViewEquate

All Implemented Interfaces:
  `Equate`

public class DBTraceProgramViewEquate extends Object implements Equate

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final DBTraceEquate`
  `equate`
  `protected final DBTraceProgramView`
  `program`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DBTraceProgramViewEquate(DBTraceProgramView program, DBTraceEquate equate)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addReference(long dynamicHash, Address refAddr)`
  Add a reference (at the given dynamic hash position) to this equate.
  `void`
  `addReference(Address refAddr, int opndPosition)`
  Add a reference (at the given operand position) to this equate.
  `String`
  `getDisplayName()`
  Gets the "display name" of this equate.
  `String`
  `getDisplayValue()`
  Gets a more accurate representation of the equate value.
  `UniversalID`
  `getEnumUUID()`
  Gets the universal id from this equate if the equate was based off of an enum.
  `String`
  `getName()`
  Get the actual name of this equate.
  `int`
  `getReferenceCount()`
  Get the number of references to this equate.
  `EquateReference[]`
  `getReferences()`
  Get the references for this equate.
  `List<EquateReference>`
  `getReferences(Address refAddr)`
  Get references for this equate attached to a specific address
  `long`
  `getValue()`
  Get the value of this equate.
  `boolean`
  `isEnumBased()`
  Checks if equate is based off an enum's universal id.
  `boolean`
  `isValidUUID()`
  Checks if equate is based off an enum's universal id and checks if the enum still exists.
  `void`
  `removeReference(long dynamicHash, Address refAddr)`
  Remove the reference at the given address
  `void`
  `removeReference(Address refAddr, int opndPosition)`
  Remove the reference at the given operand position.
  `void`
  `renameEquate(String newName)`
  Changes the name associated with the equate.

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

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

  ### Methods inherited from interface ghidra.program.model.symbol.Equate

  `toString`

- ## Field Details

  - ### program

    protected final DBTraceProgramView program

  - ### equate

    protected final DBTraceEquate equate

- ## Constructor Details

  - ### DBTraceProgramViewEquate

    public DBTraceProgramViewEquate(DBTraceProgramView program, DBTraceEquate equate)

- ## Method Details

  - ### getName

    public String getName()
    Description copied from interface: `Equate`
    Get the actual name of this equate. Note that this name may be different than the "display name," which is what the user will see.
    Specified by:
      `getName` in interface `Equate`
    Returns:
      The actual name of this equate.

  - ### getDisplayName

    public String getDisplayName()
    Description copied from interface: `Equate`
    Gets the "display name" of this equate. Note that the display name may be different than the equate's actual name if the equate is based off a data type id.
    Specified by:
      `getDisplayName` in interface `Equate`
    Returns:
      The "display name" of this equate.

  - ### getValue

    public long getValue()
    Description copied from interface: `Equate`
    Get the value of this equate.
    Specified by:
      `getValue` in interface `Equate`

  - ### getDisplayValue

    public String getDisplayValue()
    Description copied from interface: `Equate`
    Gets a more accurate representation of the equate value. Used for rendering as close to the listing as possible.
    Specified by:
      `getDisplayValue` in interface `Equate`
    Returns:
      A more accurate representation of the equate value.

  - ### getReferenceCount

    public int getReferenceCount()
    Description copied from interface: `Equate`
    Get the number of references to this equate.
    Specified by:
      `getReferenceCount` in interface `Equate`

  - ### addReference

    public void addReference(Address refAddr, int opndPosition)
    Description copied from interface: `Equate`
    Add a reference (at the given operand position) to this equate. If a reference already exists for the instruction at this address, then the old reference will be removed before the new reference is added.
    Specified by:
      `addReference` in interface `Equate`
    Parameters:
      `refAddr` - the address where the equate is used.
      `opndPosition` - the operand index where the equate is used.

  - ### addReference

    public void addReference(long dynamicHash, Address refAddr)
    Description copied from interface: `Equate`
    Add a reference (at the given dynamic hash position) to this equate. If a reference already exists for the instruction at this address, then the old reference will be removed before the new reference is added.
    Specified by:
      `addReference` in interface `Equate`
    Parameters:
      `dynamicHash` - constant varnode dynamic hash value
      `refAddr` - the address where the equate is used.

  - ### renameEquate

    public void renameEquate(String newName) throws DuplicateNameException, InvalidInputException
    Description copied from interface: `Equate`
    Changes the name associated with the equate.
    Specified by:
      `renameEquate` in interface `Equate`
    Parameters:
      `newName` - the new name for this equate.
    Throws:
      `DuplicateNameException` - thrown if newName is already used by another equate.
      `InvalidInputException` - if newName contains blank characters, is zero length, or is null

  - ### getReferences

    public EquateReference[] getReferences()
    Description copied from interface: `Equate`
    Get the references for this equate.
    Specified by:
      `getReferences` in interface `Equate`
    Returns:
      a array of EquateReferences.

  - ### getReferences

    public List<EquateReference> getReferences(Address refAddr)
    Description copied from interface: `Equate`
    Get references for this equate attached to a specific address
    Specified by:
      `getReferences` in interface `Equate`
    Parameters:
      `refAddr` - is the address
    Returns:
      the list of EquateReferences

  - ### removeReference

    public void removeReference(Address refAddr, int opndPosition)
    Description copied from interface: `Equate`
    Remove the reference at the given operand position.
    Specified by:
      `removeReference` in interface `Equate`
    Parameters:
      `refAddr` - the address that was using this equate
      `opndPosition` - the operand index of the operand that was using this eqate.

  - ### removeReference

    public void removeReference(long dynamicHash, Address refAddr)
    Description copied from interface: `Equate`
    Remove the reference at the given address
    Specified by:
      `removeReference` in interface `Equate`
    Parameters:
      `dynamicHash` - the hash of the reference
      `refAddr` - the reference's address

  - ### isValidUUID

    public boolean isValidUUID()
    Description copied from interface: `Equate`
    Checks if equate is based off an enum's universal id and checks if the enum still exists. The equate is still valid if the equate is not based off an enum.
    Specified by:
      `isValidUUID` in interface `Equate`
    Returns:
      true if the equate is based off an enum that still exists.

  - ### isEnumBased

    public boolean isEnumBased()
    Description copied from interface: `Equate`
    Checks if equate is based off an enum's universal id.
    Specified by:
      `isEnumBased` in interface `Equate`
    Returns:

  - ### getEnumUUID

    public UniversalID getEnumUUID()
    Description copied from interface: `Equate`
    Gets the universal id from this equate if the equate was based off of an enum.
    Specified by:
      `getEnumUUID` in interface `Equate`
    Returns:
      The universal id for this equate.