Package ghidra.program.model.symbol
Interface Equate
- 
- All Known Implementing Classes:
- EquateDB
 
 public interface EquateAn Equate associates a string with a scalar value in the program, and contains a list of addresses and operand positions that refer to this equate.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddReference(long dynamicHash, Address refAddr)Add a reference (at the given dynamic hash position) to this equate.voidaddReference(Address refAddr, int opndPosition)Add a reference (at the given operand position) to this equate.java.lang.StringgetDisplayName()Gets the "display name" of this equate.java.lang.StringgetDisplayValue()Gets a more accurate representation of the equate value.UniversalIDgetEnumUUID()Gets the universal id from this equate if the equate was based off of an enum.java.lang.StringgetName()Get the actual name of this equate.intgetReferenceCount()Get the number of references to this equate.EquateReference[]getReferences()Get the references for this equate.longgetValue()Get the value of this equate.booleanisEnumBased()Checks if equate is based off an enum's universal id.booleanisValidUUID()Checks if equate is based off an enum's universal id and checks if the enum still exists.voidremoveReference(long dynamicHash, Address refAddr)Remove the reference at the given operand position.voidremoveReference(Address refAddr, int opndPosition)Remove the reference at the given operand position.voidrenameEquate(java.lang.String newName)Changes the name associated with the equate.java.lang.StringtoString()Get the name of this equate.
 
- 
- 
- 
Method Detail- 
getNamejava.lang.String getName() 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.- Returns:
- The actual name of this equate.
 
 - 
getDisplayNamejava.lang.String getDisplayName() 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.- Returns:
- The "display name" of this equate.
 
 - 
getValuelong getValue() Get the value of this equate.
 - 
getDisplayValuejava.lang.String getDisplayValue() Gets a more accurate representation of the equate value. Used for rendering as close to the listing as possible.- Returns:
- A more accurate representation of the equate value.
 
 - 
getReferenceCountint getReferenceCount() Get the number of references to this equate.
 - 
addReferencevoid addReference(Address refAddr, int opndPosition) 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.- Parameters:
- refAddr- the address where the equate is used.
- opndPosition- the operand index where the equate is used.
 
 - 
addReferencevoid addReference(long dynamicHash, Address refAddr)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.- Parameters:
- dynamicHash- constant varnode dynamic hash value
- refAddr- the address where the equate is used.
 
 - 
renameEquatevoid renameEquate(java.lang.String newName) throws DuplicateNameException, InvalidInputExceptionChanges the name associated with the 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
 
 - 
getReferencesEquateReference[] getReferences() Get the references for this equate.- Returns:
- a array of EquateReferences.
 
 - 
removeReferencevoid removeReference(Address refAddr, int opndPosition) Remove the reference at the given operand position.- Parameters:
- refAddr- the address that was using this equate
- opndPosition- the operand index of the operand that was using this eqate.
 
 - 
removeReferencevoid removeReference(long dynamicHash, Address refAddr)Remove the reference at the given operand position.- Parameters:
- refAddr- the address that was using this equate
- opndPosition- the operand index of the operand that was using this eqate.
 
 - 
isValidUUIDboolean isValidUUID() 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.- Returns:
- true if the equate is based off an enum that still exists.
 
 - 
isEnumBasedboolean isEnumBased() Checks if equate is based off an enum's universal id.- Returns:
 
 - 
getEnumUUIDUniversalID getEnumUUID() Gets the universal id from this equate if the equate was based off of an enum.- Returns:
- The universal id for this equate.
 
 - 
toStringjava.lang.String toString() Get the name of this equate.- Overrides:
- toStringin class- java.lang.Object
- See Also:
- getName()
 
 
- 
 
-