Package ghidra.program.util
Class VariableNameFieldLocation
- java.lang.Object
-
- ghidra.program.util.ProgramLocation
-
- ghidra.program.util.FunctionLocation
-
- ghidra.program.util.VariableLocation
-
- ghidra.program.util.VariableNameFieldLocation
-
- All Implemented Interfaces:
java.lang.Comparable<ProgramLocation>
public class VariableNameFieldLocation extends VariableLocation
TheVariableNameFieldLocationclass provides specific information about the variable name 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
Constructors Constructor Description VariableNameFieldLocation()Should only be used by XML restoration.VariableNameFieldLocation(Program program, Address locationAddr, Variable var, int charOffset)Construct a new VariableNameFieldLocation object.VariableNameFieldLocation(Program program, Variable var, int charOffset)Construct a new VariableNameFieldLocation object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetName()Returns the name of the variable for this location.inthashCode()voidrestoreState(Program p, SaveState obj)Restore this function location using the given program and save state object.voidsaveState(SaveState obj)Save this function location to the given save state object.-
Methods inherited from class ghidra.program.util.VariableLocation
compareTo, getVariable, isLocationFor, isParameter, isReturn, isValid, toString
-
Methods inherited from class ghidra.program.util.FunctionLocation
getFunctionAddress
-
Methods inherited from class ghidra.program.util.ProgramLocation
compareAddr, getAddress, getByteAddress, getCharOffset, getColumn, getComponentPath, getLocation, getProgram, getRefAddress, getRow
-
-
-
-
Constructor Detail
-
VariableNameFieldLocation
public VariableNameFieldLocation(Program program, Address locationAddr, Variable var, int charOffset)
Construct a new VariableNameFieldLocation object.- Parameters:
program- the program of the locationlocationAddr- the address of the listing location (i.e., referent code unit)var- the variable the name is for.charOffset- the position within the function name string for this location.
-
VariableNameFieldLocation
public VariableNameFieldLocation(Program program, Variable var, int charOffset)
Construct a new VariableNameFieldLocation object. Variable function entry point is the assumed listing location (i.e., referent code unit). Care should be taken if variable corresponds to an EXTERNAL function.- Parameters:
program- the program of the locationvar- the variable the name is for.charOffset- the position within the function name string for this location.
-
VariableNameFieldLocation
public VariableNameFieldLocation()
Should only be used by XML restoration.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the variable for this location.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classProgramLocation
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classVariableLocation- See Also:
Object.equals(java.lang.Object)
-
restoreState
public void restoreState(Program p, SaveState obj)
Description copied from class:FunctionLocationRestore this function location using the given program and save state object.- Overrides:
restoreStatein classVariableLocation- Parameters:
p- the program containing the function locationobj- the save state object for saving the location
-
saveState
public void saveState(SaveState obj)
Description copied from class:FunctionLocationSave this function location to the given save state object.- Overrides:
saveStatein classVariableLocation- Parameters:
obj- the save state object for saving the location
-
-