Package ghidra.program.util
Class MnemonicFieldLocation
- java.lang.Object
-
- ghidra.program.util.ProgramLocation
-
- ghidra.program.util.CodeUnitLocation
-
- ghidra.program.util.MnemonicFieldLocation
-
- All Implemented Interfaces:
java.lang.Comparable<ProgramLocation>
public class MnemonicFieldLocation extends CodeUnitLocation
TheMnemonicFieldLocation
class contains specific location information within the MNEMONIC field of a CodeUnitLocation object.
-
-
Field Summary
-
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
-
Constructor Summary
Constructors Constructor Description MnemonicFieldLocation()
Default constructor needed for restoring a mnemonic field location from XML.MnemonicFieldLocation(Program program, Address address)
MnemonicFieldLocation(Program program, Address addr, int[] componentPath, java.lang.String mnemonicString, int charOffset)
Construct a new MnemonicFieldLocation.MnemonicFieldLocation(Program program, Address addr, Address refAddr, int[] componentPath, java.lang.String mnemonicString, int charOffset)
Construct a new MnemonicFieldLocation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.lang.String
getMnemonic()
Returns the mnemonic string at this location.int
hashCode()
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.CodeUnitLocation
isValid
-
Methods inherited from class ghidra.program.util.ProgramLocation
compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow
-
-
-
-
Constructor Detail
-
MnemonicFieldLocation
public MnemonicFieldLocation(Program program, Address addr, int[] componentPath, java.lang.String mnemonicString, int charOffset)
Construct a new MnemonicFieldLocation.- Parameters:
the
- program of the locationaddr
- address of the location; should not be nullcomponentPath
- array of indexes for each nested data component; the index is the data component's index within its parent; may be nullmnemonicString
- the mnemonic stringcharOffset
- the character position within the mnemonic string for this location.
-
MnemonicFieldLocation
public MnemonicFieldLocation(Program program, Address addr, Address refAddr, int[] componentPath, java.lang.String mnemonicString, int charOffset)
Construct a new MnemonicFieldLocation.- Parameters:
the
- program of the locationaddr
- address of the location; should not be nullrefAddr
- the "referred to" address if the location is over a reference; may be nullcomponentPath
- array of indexes for each nested data component; the index is the data component's index within its parent; may be nullmnemonicString
- the mnemonic stringcharOffset
- the character position within the mnemonic string for this location.
-
MnemonicFieldLocation
public MnemonicFieldLocation(Program program, Address address)
- See Also:
CodeUnitLocation#ProgramLocation(Program, Address)
-
MnemonicFieldLocation
public MnemonicFieldLocation()
Default constructor needed for restoring a mnemonic field location from XML.
-
-
Method Detail
-
getMnemonic
public java.lang.String getMnemonic()
Returns the mnemonic string at this location.
-
toString
public java.lang.String toString()
Returns a String representation of this location.- Overrides:
toString
in classProgramLocation
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classProgramLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classProgramLocation
-
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 classProgramLocation
-
saveState
public void saveState(SaveState obj)
Description copied from class:ProgramLocation
Save this program location to the given save state object.- Overrides:
saveState
in classProgramLocation
- Parameters:
obj
- the save state object for saving the location
-
-