Interface FunctionSignature

All Known Subinterfaces:
FunctionDefinition
All Known Implementing Classes:
FunctionDefinitionDataType, FunctionSignatureImpl

public interface FunctionSignature
Interface describing all the things about a function that are portable from one program to another.
  • Field Details

  • Method Details

    • getName

      String getName()
      Return the name of this function
    • getPrototypeString

      String getPrototypeString()
      Get string representation of the function signature without the calling convention specified.
      Returns:
      function signature string
    • getPrototypeString

      String getPrototypeString(boolean includeCallingConvention)
      Get string representation of the function signature
      Parameters:
      includeCallingConvention - if true prototype will include call convention declaration if known as well as noreturn indicator if applicable.
      Returns:
      function signature string
    • getArguments

      ParameterDefinition[] getArguments()
      Get function signature parameter arguments
      Returns:
      an array of parameters for the function
    • getReturnType

      DataType getReturnType()
      Get function signature return type
      Returns:
      the return data type
    • getComment

      String getComment()
      Get descriptive comment for signature
      Returns:
      the comment string
    • hasVarArgs

      boolean hasVarArgs()
      Returns:
      true if this function signature has a variable argument list (VarArgs).
    • hasNoReturn

      boolean hasNoReturn()
      Returns:
      true if this function signature corresponds to a non-returning function.
    • getCallingConvention

      PrototypeModel getCallingConvention()
      Gets the calling convention prototype model for this function if associated with a compiler specificfation. This method will always return null if signature is not associated with a specific program architecture.
      Returns:
      the prototype model of the function's current calling convention or null.
    • getCallingConventionName

      String getCallingConventionName()
      Returns the calling convention name associated with this function definition. Reserved names may also be returned: Function.UNKNOWN_CALLING_CONVENTION_STRING, Function.DEFAULT_CALLING_CONVENTION_STRING. The "unknown" convention must be returned instead of null.
      Returns:
      calling convention name
    • hasUnknownCallingConventionName

      default boolean hasUnknownCallingConventionName()
      Determine if this signature has an unknown or unrecognized calling convention name.
      Returns:
      true if calling convention is unknown or unrecognized name, else false.
    • isEquivalentSignature

      boolean isEquivalentSignature(FunctionSignature signature)
      Returns true if the given signature is equivalent to this signature. The precise meaning of "equivalent" is dependent upon return/parameter dataTypes.
      Parameters:
      signature - the function signature being tested for equivalence.
      Returns:
      true if the if the given signature is equivalent to this signature.