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 ofOperandFieldLocation
that 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 boolean
equals(java.lang.Object obj)
Equate
getEquate()
Returns the equate at this operand field location.long
getEquateValue()
EquateReference[]
getReferences()
void
restoreState(Program p, SaveState obj)
Restore this program location using the given program and save state object.void
saveState(SaveState obj)
Save this program location to the given save state object.java.lang.String
toString()
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:
toString
in classOperandFieldLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classOperandFieldLocation
- See Also:
Object.equals(java.lang.Object)
-
restoreState
public void restoreState(Program p, SaveState obj)
Description copied from class:ProgramLocation
Restore this program location using the given program and save state object.- Overrides:
restoreState
in classOperandFieldLocation
-
saveState
public void saveState(SaveState obj)
Description copied from class:ProgramLocation
Save this program location to the given save state object.- Overrides:
saveState
in classOperandFieldLocation
- Parameters:
obj
- the save state object for saving the location
-
-