Package ghidra.program.model.data
Interface ParameterDefinition
- All Superinterfaces:
Comparable<ParameterDefinition>
- All Known Implementing Classes:
ParameterDefinitionImpl
ParameterDefinition
specifies a parameter which can be
used to specify a function definition.-
Method Summary
Modifier and TypeMethodDescriptionGet the Comment for this variableGet the Data Type of this variableint
Get the length of this variablegetName()
Get the Name of this variable.int
Get the parameter ordinalboolean
Determine if parm is equivalent to this parameter definition by both ordinal and datatype.boolean
isEquivalent
(Variable variable) Determine if a variable corresponds to a parameter which is equivalent to this parameter definition by both ordinal and datatype.void
setComment
(String comment) Set the comment for this variablevoid
setDataType
(DataType type) Set the Data Type of this variable.void
Set the name of this variable.Methods inherited from interface java.lang.Comparable
compareTo
-
Method Details
-
getOrdinal
int getOrdinal()Get the parameter ordinal- Returns:
- the ordinal (index) of this parameter within the function signature.
-
getDataType
DataType getDataType()Get the Data Type of this variable- Returns:
- the data type of the variable
-
setDataType
Set the Data Type of this variable.- Parameters:
type
- dataType the fixed-length datatype of the parameter- Throws:
IllegalArgumentException
- if invalid parameter datatype specified
-
getName
String getName()Get the Name of this variable.- Returns:
- the name of the variable or null if no name has been specified.
-
getLength
int getLength()Get the length of this variable- Returns:
- the length of the variable
-
setName
Set the name of this variable.- Parameters:
name
- the name
-
getComment
String getComment()Get the Comment for this variable- Returns:
- the comment
-
setComment
Set the comment for this variable- Parameters:
comment
- the comment
-
isEquivalent
Determine if a variable corresponds to a parameter which is equivalent to this parameter definition by both ordinal and datatype. Name is not considered relevant.- Parameters:
variable
- variable to be compared with this parameter definition.- Returns:
- true if the specified variable represents the same parameter by ordinal
and dataType. False will always be returned if specified variable is
not a
Parameter
.
-
isEquivalent
Determine if parm is equivalent to this parameter definition by both ordinal and datatype. Name is not considered relevant.- Parameters:
parm
- parameter definition to be compared with this parameter definition.- Returns:
- true if the specified parameter definition represents the same parameter by ordinal and dataType.
-