Package ghidra.pcode.struct

# Annotation Interface StructuredSleigh.Param

Enclosing class:
  `StructuredSleigh`

@Retention(RUNTIME) @Target(PARAMETER) protected static @interface StructuredSleigh.Param
Declare a parameter of the p-code userop

This is attached to parameters of methods annotated with `StructuredSleigh.StructuredUserop`, providing the type and name of the parameter. The Java type of the parameter must be `StructuredSleigh.Var`. For example:

     @StructuredUserop
     public void twice(@Param(name = "p0", type = "void *") Var p0) {
            _result(p0.mul(2));
     }

- ## Required Element Summary

  Required Elements
  Modifier and Type
  Required Element
  Description
  `String`
  `type`
  The data type path for the type of the parameter.

- ## Optional Element Summary

  Optional Elements
  Modifier and Type
  Optional Element
  Description
  `String`
  `name`
  The name of the parameter in the output Sleigh code

- ## Element Details

  - ### type

    String type
    The data type path for the type of the parameter. See `StructuredSleigh.type(String)`.

  - ### name

    String name
    The name of the parameter in the output Sleigh code

    If the variable is referenced via `StructuredSleigh.s(String)` or `StructuredSleigh.e(String)`, then is it necessary to specify the name used in the Sleigh code. Otherwise, the name is typically derived from the Java parameter name, which Java platforms are not required to preserve. If the variable is referenced only by its handle, then the name will be consistent and unique in the generated Sleigh code. When diagnosing Structured Sleigh compilation issues, it may be desirable to specify the variable name, regardless.

    Default:
      `""`