Package ghidra.program.util
Class EquateOperandFieldLocation
- java.lang.Object
-
- ghidra.program.util.ProgramLocation
-
- ghidra.program.util.CodeUnitLocation
-
- ghidra.program.util.OperandFieldLocation
-
- ghidra.program.util.EquateOperandFieldLocation
-
- All Implemented Interfaces:
java.lang.Comparable<ProgramLocation>
public class EquateOperandFieldLocation extends OperandFieldLocation
A simple version ofOperandFieldLocationthat allows us to store equate information.
-
-
Field Summary
-
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
-
Constructor Summary
Constructors Constructor Description EquateOperandFieldLocation()Default constructor needed for restoring an operand field location from XML.EquateOperandFieldLocation(Program program, Address addr, Address refAddr, java.lang.String rep, Equate equate, int opIndex, int subOpIndex, int charOffset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)EquategetEquate()Returns the equate at this operand field location.longgetEquateValue()EquateReference[]getReferences()voidrestoreState(Program p, SaveState obj)Restore this program location using the given program and save state object.voidsaveState(SaveState obj)Save this program location to the given save state object.java.lang.StringtoString()Returns a String representation of this location.-
Methods inherited from class ghidra.program.util.OperandFieldLocation
getOperandIndex, getOperandRepresentation, getSubOperandIndex, getVariableOffset, hashCode
-
Methods inherited from class ghidra.program.util.CodeUnitLocation
isValid
-
Methods inherited from class ghidra.program.util.ProgramLocation
compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow
-
-
-
-
Constructor Detail
-
EquateOperandFieldLocation
public EquateOperandFieldLocation(Program program, Address addr, Address refAddr, java.lang.String rep, Equate equate, int opIndex, int subOpIndex, int charOffset)
- Parameters:
program- The programaddr- the address of the locationrefAddr- the reference address.rep- the representation of the equate locationequate- the equate object.opIndex- the operand indexsubOpIndex- the operand subOpIndexcharOffset- the character offset in to subOpPiece.
-
EquateOperandFieldLocation
public EquateOperandFieldLocation()
Default constructor needed for restoring an operand field location from XML.
-
-
Method Detail
-
getEquate
public Equate getEquate()
Returns the equate at this operand field location.- Returns:
- equate
-
getEquateValue
public long getEquateValue()
-
getReferences
public EquateReference[] getReferences()
-
toString
public java.lang.String toString()
Returns a String representation of this location.- Overrides:
toStringin classOperandFieldLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classOperandFieldLocation- See Also:
Object.equals(java.lang.Object)
-
restoreState
public void restoreState(Program p, SaveState obj)
Description copied from class:ProgramLocationRestore this program location using the given program and save state object.- Overrides:
restoreStatein classOperandFieldLocation
-
saveState
public void saveState(SaveState obj)
Description copied from class:ProgramLocationSave this program location to the given save state object.- Overrides:
saveStatein classOperandFieldLocation- Parameters:
obj- the save state object for saving the location
-
-