Package ghidra.pcode.exec

# Class AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>

java.lang.Object
ghidra.pcode.exec.AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>

Type Parameters:
  `T` - the type of data processed by the userop

All Implemented Interfaces:
  `PcodeUseropLibrary.PcodeUseropDefinition<T>`

Direct Known Subclasses:
  `AnnotatedPcodeUseropLibrary.FixedArgsAnnotatedPcodeUseropDefinition`, `AnnotatedPcodeUseropLibrary.VariadicAnnotatedPcodeUseropDefinition`

Enclosing class:
  AnnotatedPcodeUseropLibrary<T>

protected abstract static class AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T> extends Object implements PcodeUseropLibrary.PcodeUseropDefinition<T>
A wrapped, annotated Java method, exported as a userop definition

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected final Method`
  `method`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AnnotatedPcodeUseropDefinition(AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected static <T> AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T>`
  `create(AnnotatedPcodeUseropLibrary.PcodeUserop annot, AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method)`
  `void`
  `execute(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars)`
  Invoke/execute the userop.
  `String`
  `getName()`
  Get the name of the userop.
  `protected void`
  `initFinished()`
  `protected void`
  `initStarting()`
  `protected abstract void`
  `placeInputs(PcodeExecutor<T> executor, List<Object> args, List<Varnode> inVars)`
  `protected abstract void`
  `processNonAnnotatedParameter(Type declClsOpType, Type opType, int i, Parameter p)`
  `protected void`
  `validateInputs(List<Varnode> inVars)`

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

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

  ### Methods inherited from interface ghidra.pcode.exec.PcodeUseropLibrary.PcodeUseropDefinition

  `getInputCount`

- ## Field Details

  - ### method

    protected final Method method

- ## Constructor Details

  - ### AnnotatedPcodeUseropDefinition

    public AnnotatedPcodeUseropDefinition(AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method)

- ## Method Details

  - ### create

    protected static <T> AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition<T> create(AnnotatedPcodeUseropLibrary.PcodeUserop annot, AnnotatedPcodeUseropLibrary<T> library, Type opType, MethodHandles.Lookup lookup, Method method)

  - ### getName

    public String getName()
    Description copied from interface: `PcodeUseropLibrary.PcodeUseropDefinition`
    Get the name of the userop.

    This is the symbol assigned to the userop when compiling new Sleigh code. It cannot conflict with existing userops (except those declared, but not defined, by the executor's language) or other symbols of the executor's language. If this userop is to be used generically across many languages, choose an unlikely name. Conventionally, these start with two underscores `__`.

    Specified by:
      `getName` in interface `PcodeUseropLibrary.PcodeUseropDefinition<T>`
    Returns:
      the name of the userop

  - ### execute

    public void execute(PcodeExecutor<T> executor, PcodeUseropLibrary<T> library, Varnode outVar, List<Varnode> inVars)
    Description copied from interface: `PcodeUseropLibrary.PcodeUseropDefinition`
    Invoke/execute the userop.
    Specified by:
      `execute` in interface `PcodeUseropLibrary.PcodeUseropDefinition<T>`
    Parameters:
      `executor` - the executor invoking this userop.
      `library` - the complete library for this execution. Note the library may have been composed from more than the one defining this userop.
      `outVar` - if invoked as an rval, the destination varnode for the userop's output. Otherwise, `null`.
      `inVars` - the input varnodes as ordered in the source.
    See Also:
      - `AnnotatedPcodeUseropLibrary.AnnotatedPcodeUseropDefinition`

  - ### initStarting

    protected void initStarting()

  - ### processNonAnnotatedParameter

    protected abstract void processNonAnnotatedParameter(Type declClsOpType, Type opType, int i, Parameter p)

  - ### initFinished

    protected void initFinished()

  - ### validateInputs

    protected void validateInputs(List<Varnode> inVars) throws PcodeExecutionException
    Throws:
      `PcodeExecutionException`

  - ### placeInputs

    protected abstract void placeInputs(PcodeExecutor<T> executor, List<Object> args, List<Varnode> inVars)