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:
  • Constructor Details

  • 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)
      Parameters:
      additionalParams - the additional parameter names
      Returns:
      this builder
      See Also:
    • body

      public SleighPcodeUseropDefinition.Builder body(CharSequence additionalBody)
      Add Sleigh source to the body
      Parameters:
      additionalBody - the additional source
      Returns:
      this builder
    • 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