Package ghidra.pcode.exec

# Class SleighPcodeUseropDefinition.Builder

java.lang.Object
ghidra.pcode.exec.SleighPcodeUseropDefinition.Builder

Enclosing class:
  SleighPcodeUseropDefinition<T>

public static class SleighPcodeUseropDefinition.Builder extends Object
A builder for a particular userop

See Also:
  - `SleighPcodeUseropDefinition.Factory`

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `Builder(SleighPcodeUseropDefinition.Factory factory, String name)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `SleighPcodeUseropDefinition.Builder`
  `body(CharSequence additionalBody)`
  Add Sleigh source to the body
  `<T> SleighPcodeUseropDefinition<T>`
  `build()`
  Build the actual definition
  `SleighPcodeUseropDefinition.Builder`
  `params(String... additionalParams)`
  `SleighPcodeUseropDefinition.Builder`
  `params(Collection<String> additionalParams)`
  Add parameters with the given names (to the end)

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    protected Builder(SleighPcodeUseropDefinition.Factory factory, String name)

- ## Method Details

  - ### params

    public SleighPcodeUseropDefinition.Builder params(Collection<String> additionalParams)
    Add parameters with the given names (to the end)
    Parameters:
      `additionalParams` - the additional parameter names
    Returns:
      this builder

  - ### params

    public SleighPcodeUseropDefinition.Builder params(String... additionalParams)
    See Also:
      - `params(Collection)`

  - ### body

    public SleighPcodeUseropDefinition.Builder body(CharSequence additionalBody)
    Add Sleigh source to the body
    Parameters:
      `additionalBody` - the additional source

  - ### build

    public <T> SleighPcodeUseropDefinition<T> build()
    Build the actual definition

    NOTE: Compilation of the sleigh source is delayed until the first invocation, since the compiler must know about the varnodes used as parameters. TODO: There may be some way to template it at the p-code level instead of the Sleigh source level.

    Type Parameters:
      `T` - no particular type, except to match the executor
    Returns:
      the definition