Package ghidra.program.util
Class FunctionRepeatableCommentFieldLocation
java.lang.Object
ghidra.program.util.ProgramLocation
ghidra.program.util.FunctionLocation
ghidra.program.util.FunctionRepeatableCommentFieldLocation
- All Implemented Interfaces:
Cloneable
,Comparable<ProgramLocation>
The
FunctionRepeatableCommentFieldLocation
class provides specific information
about the Function Repeatable Comment field within a program location.-
Field Summary
Fields inherited from class ghidra.program.util.FunctionLocation
functionAddr
Fields inherited from class ghidra.program.util.ProgramLocation
addr, program, refAddr
-
Constructor Summary
ConstructorDescriptionDefault constructor needed for restoring a program location from XMLFunctionRepeatableCommentFieldLocation
(Program program, Address locationAddr, Address functionAddr, String[] comment, int row, int charOffset) Construct a new FunctionRepeatableCommentFieldLocation object.FunctionRepeatableCommentFieldLocation
(Program program, Address functionAddr, String[] comment, int row, int col) Construct a new FunctionRepeatableCommentFieldLocation object. -
Method Summary
Modifier and TypeMethodDescriptionboolean
String[]
Return the function comment string at this location.int
hashCode()
void
restoreState
(Program p, SaveState obj) Restore this function location using the given program and save state object.void
Save this function location to the given save state object.Methods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddress, isValid, toString
Methods inherited from class ghidra.program.util.ProgramLocation
clone, compareAddr, compareTo, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow, getTranslatedCopy
-
Constructor Details
-
FunctionRepeatableCommentFieldLocation
public FunctionRepeatableCommentFieldLocation(Program program, Address locationAddr, Address functionAddr, String[] comment, int row, int charOffset) Construct a new FunctionRepeatableCommentFieldLocation object.- Parameters:
program
- the program of the locationlocationAddr
- the address of the listing location (i.e., referent code unit)functionAddr
- the function addresscomment
- the function comment array String at this location.row
- row number (index into the comment array)charOffset
- character position within the comment, indexed by row
-
FunctionRepeatableCommentFieldLocation
public FunctionRepeatableCommentFieldLocation(Program program, Address functionAddr, String[] comment, int row, int col) Construct a new FunctionRepeatableCommentFieldLocation object.- Parameters:
program
- the program of the locationfunctionAddr
- the function address (must not be an EXTERNAL function)comment
- the function comment array String at this location.row
- row number (index into the comment array)col
- character position within the comment, indexed by row
-
FunctionRepeatableCommentFieldLocation
public FunctionRepeatableCommentFieldLocation()Default constructor needed for restoring a program location from XML
-
-
Method Details
-
getComment
Return the function comment string at this location. -
hashCode
public int hashCode()- Overrides:
hashCode
in classProgramLocation
-
equals
- Overrides:
equals
in classFunctionLocation
- See Also:
-
saveState
Description copied from class:FunctionLocation
Save this function location to the given save state object.- Overrides:
saveState
in classFunctionLocation
- Parameters:
obj
- the save state object for saving the location
-
restoreState
Description copied from class:FunctionLocation
Restore this function location using the given program and save state object.- Overrides:
restoreState
in classFunctionLocation
- Parameters:
p
- the program containing the function locationobj
- the save state object for saving the location
-