Package ghidra.program.model.listing

# Interface Parameter

All Superinterfaces:
  `Comparable<Variable>`, `Variable`

All Known Implementing Classes:
  `AutoParameterImpl`, `ParameterImpl`, `ReturnParameterDB`, `ReturnParameterImpl`

public interface Parameter extends Variable
Interface for function parameters

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `RETURN_NAME`
  `static final int`
  `RETURN_ORIDINAL`
  `static final int`
  `UNASSIGNED_ORDINAL`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `AutoParameterType`
  `getAutoParameterType()`
  If this is an auto-parameter this method will indicate its type.
  `DataType`
  `getFormalDataType()`
  Get the original formal signature data type before a possible forced indirect was possibly imposed by the functions calling convention.
  `int`
  `getOrdinal()`
  Returns the ordinal (index) of this parameter within the function signature.
  `boolean`
  `isAutoParameter()`
  `boolean`
  `isForcedIndirect()`
  If this parameter which was forced by the associated calling convention to be passed as a pointer instead of its original formal type.

  ### Methods inherited from interface java.lang.Comparable

  `compareTo`

  ### Methods inherited from interface ghidra.program.model.listing.Variable

  `getComment, getDataType, getFirstStorageVarnode, getFirstUseOffset, getFunction, getLastStorageVarnode, getLength, getMinAddress, getName, getProgram, getRegister, getRegisters, getSource, getStackOffset, getSymbol, getVariableStorage, hasAssignedStorage, hasStackStorage, isCompoundVariable, isEquivalent, isMemoryVariable, isRegisterVariable, isStackVariable, isUniqueVariable, isValid, setComment, setDataType, setDataType, setDataType, setName`

- ## Field Details

  - ### RETURN_NAME

    static final String RETURN_NAME
    See Also:
      - Constant Field Values

  - ### RETURN_ORIDINAL

    static final int RETURN_ORIDINAL
    See Also:
      - Constant Field Values

  - ### UNASSIGNED_ORDINAL

    static final int UNASSIGNED_ORDINAL
    See Also:
      - Constant Field Values

- ## Method Details

  - ### getOrdinal

    int getOrdinal()
    Returns the ordinal (index) of this parameter within the function signature.

  - ### isAutoParameter

    boolean isAutoParameter()
    Returns:
      true if this parameter is automatically generated based upon the associated function calling convention and function signature. An example of such a parameter include the "__return_storage_ptr__" parameter.

  - ### getAutoParameterType

    AutoParameterType getAutoParameterType()
    If this is an auto-parameter this method will indicate its type.
    Returns:
      auto-parameter type of null if not applicable.

  - ### isForcedIndirect

    boolean isForcedIndirect()
    If this parameter which was forced by the associated calling convention to be passed as a pointer instead of its original formal type.
    Returns:
      true if this parameter was forced to be passed as a pointer instead of its original formal type

  - ### getFormalDataType

    DataType getFormalDataType()
    Get the original formal signature data type before a possible forced indirect was possibly imposed by the functions calling convention. The `Variable.getDataType()` method will always return the effective data type which corresponds to the allocated variable storage.
    Returns:
      Formal data type. This type will only differ from the `Variable.getDataType()` value if this parameter isForcedIndirect.