Class AddParameterCommand

java.lang.Object
ghidra.app.cmd.function.AddParameterCommand
All Implemented Interfaces:
Command<Program>
Direct Known Subclasses:
AddMemoryParameterCommand, AddRegisterParameterCommand, AddStackParameterCommand

@Deprecated(forRemoval=true, since="11.1") public class AddParameterCommand extends Object implements Command<Program>
Deprecated, for removal: This API element is subject to removal in a future version.
function signatures should be modified in their entirety using either UpdateFunctionCommand or ApplyFunctionSignatureCmd.
Allows for the adding of a parameter to a given function. Note: If no ordinal is provided to this class at construction time, then the ordinal of hte given parameter will be used.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Function
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final int
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected final SourceType
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    protected String
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AddParameterCommand(Function function, int ordinal, SourceType source)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
     
    AddParameterCommand(Function function, Parameter parameter, int ordinal, SourceType source)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    applyTo(Program program)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Applies the command to the given domain object.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the name of this command.
    protected Parameter
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get parameter to be added
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns the status message indicating the status of the command.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • function

      protected final Function function
      Deprecated, for removal: This API element is subject to removal in a future version.
    • ordinal

      protected final int ordinal
      Deprecated, for removal: This API element is subject to removal in a future version.
    • source

      protected final SourceType source
      Deprecated, for removal: This API element is subject to removal in a future version.
    • statusMessage

      protected String statusMessage
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • AddParameterCommand

      public AddParameterCommand(Function function, Parameter parameter, int ordinal, SourceType source)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • AddParameterCommand

      protected AddParameterCommand(Function function, int ordinal, SourceType source)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • getParameter

      protected Parameter getParameter(Program program) throws InvalidInputException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Get parameter to be added
      Parameters:
      program - target program
      Returns:
      parameter to be added
      Throws:
      InvalidInputException - if unable to generate parameter due to invalid data
    • applyTo

      public final boolean applyTo(Program program)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Command
      Applies the command to the given domain object.
      Specified by:
      applyTo in interface Command<Program>
      Parameters:
      program - domain object that this command is to be applied.
      Returns:
      true if the command applied successfully
    • getStatusMsg

      public String getStatusMsg()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Command
      Returns the status message indicating the status of the command.
      Specified by:
      getStatusMsg in interface Command<Program>
      Returns:
      reason for failure, or null if the status of the command was successful
    • getName

      public String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Command
      Returns the name of this command.
      Specified by:
      getName in interface Command<Program>
      Returns:
      the name of this command