Package ghidra.program.util
Class PlateFieldLocation
- java.lang.Object
- 
- ghidra.program.util.ProgramLocation
- 
- ghidra.program.util.CodeUnitLocation
- 
- ghidra.program.util.CommentFieldLocation
- 
- ghidra.program.util.PlateFieldLocation
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Comparable<ProgramLocation>
 
 public class PlateFieldLocation extends CommentFieldLocation ThePlateFieldLocationclass contains specific location information within the Plate field of a CodeUnitLocation object.
- 
- 
Field Summary- 
Fields inherited from class ghidra.program.util.CommentFieldLocationcomment, type
 - 
Fields inherited from class ghidra.program.util.ProgramLocationaddr, program, refAddr
 
- 
 - 
Constructor SummaryConstructors Constructor Description PlateFieldLocation()Default constructor needed for restoring a plate field location from XML.PlateFieldLocation(Program program, Address addr, int[] componentPath, int row, int charOffset, java.lang.String[] comment, int commentRow)Construct a new PlateFieldLocation.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)intgetCommentRow()Returns the index into the String[] returned byCommentFieldLocation.getComment()that represents the comment row that was clicked.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.CommentFieldLocationgetComment, getCommentType, hashCode, validateType
 - 
Methods inherited from class ghidra.program.util.CodeUnitLocationisValid
 - 
Methods inherited from class ghidra.program.util.ProgramLocationcompareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow
 
- 
 
- 
- 
- 
Constructor Detail- 
PlateFieldLocationpublic PlateFieldLocation(Program program, Address addr, int[] componentPath, int row, int charOffset, java.lang.String[] comment, int commentRow) Construct a new PlateFieldLocation.- Parameters:
- the- program of the location
- addr- the address of the code unit.
- componentPath- the componentPath of the codeUnit
- row- the line of the location
- charOffset- the character position on the row of the location.
- comment- plate comment text
- commentRow- The row index into the comments of this location. This is different than the row due to the fact that the PlateField has fictitious borders that don't exist in the actual comment.
 
 - 
PlateFieldLocationpublic PlateFieldLocation() Default constructor needed for restoring a plate field location from XML.
 
- 
 - 
Method Detail- 
toStringpublic java.lang.String toString() Description copied from class:CommentFieldLocationReturns a String representation of this location.- Overrides:
- toStringin class- CommentFieldLocation
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- CommentFieldLocation
 
 - 
getCommentRowpublic int getCommentRow() Returns the index into the String[] returned byCommentFieldLocation.getComment()that represents the comment row that was clicked. -1 will be returned if the border of the plate field was clicked.Note: This value is different than that returned by #getRowIndex(), as that value represents the screen row clicked. Further, the PlateField adds screen decoration to the comments, which causes the screen row to differ from the comment row.- Returns:
- the index into the String[] returned by CommentFieldLocation.getComment()that represents the comment row that was clicked. -1 will be returned if the border of the plate field was clicked.
 
 - 
restoreStatepublic void restoreState(Program p, SaveState obj) Description copied from class:ProgramLocationRestore this program location using the given program and save state object.- Overrides:
- restoreStatein class- CommentFieldLocation
 
 - 
saveStatepublic void saveState(SaveState obj) Description copied from class:ProgramLocationSave this program location to the given save state object.- Overrides:
- saveStatein class- CommentFieldLocation
- Parameters:
- obj- the save state object for saving the location
 
 
- 
 
-