Package ghidra.program.model.data

# Interface ParameterDefinition

All Superinterfaces:
  `Comparable<ParameterDefinition>`

All Known Implementing Classes:
  `ParameterDefinitionImpl`

public interface ParameterDefinition extends Comparable<ParameterDefinition>
`ParameterDefinition` specifies a parameter which can be used to specify a function definition.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getComment()`
  Get the Comment for this variable
  `DataType`
  `getDataType()`
  Get the Data Type of this variable
  `int`
  `getLength()`
  Get the length of this variable
  `String`
  `getName()`
  Get the Name of this variable.
  `int`
  `getOrdinal()`
  Get the parameter ordinal
  `boolean`
  `isEquivalent(ParameterDefinition parm)`
  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 variable
  `void`
  `setDataType(DataType type)`
  Set the Data Type of this variable.
  `void`
  `setName(String name)`
  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

    void setDataType(DataType type) throws IllegalArgumentException
    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

    void setName(String name)
    Set the name of this variable.
    Parameters:
      `name` - the name

  - ### getComment

    String getComment()
    Get the Comment for this variable
    Returns:
      the comment

  - ### setComment

    void setComment(String comment)
    Set the comment for this variable
    Parameters:
      `comment` - the comment

  - ### isEquivalent

    boolean isEquivalent(Variable variable)
    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

    boolean isEquivalent(ParameterDefinition parm)
    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.