Package ghidra.pcode.exec
Class AbstractSleighPcodeUseropDefinition.Builder
java.lang.Object
ghidra.pcode.exec.AbstractSleighPcodeUseropDefinition.Builder
- All Implemented Interfaces:
SleighPcodeUseropDefinition.BuilderStage1,SleighPcodeUseropDefinition.BuilderStage2
- Enclosing class:
AbstractSleighPcodeUseropDefinition<T>
public static class AbstractSleighPcodeUseropDefinition.Builder NEW
extends Object
implements SleighPcodeUseropDefinition.BuilderStage1
A builder for a particular userop
- See Also:
-
Constructor Summary
ConstructorsChangeModifierConstructorDescriptionprotectedBuilder(SleighPcodeUseropDefinition.Factory factory, String name) -
Method Summary
ChangeModifier and TypeMethodDescriptionbody(SleighPcodeUseropDefinition.BodyFunc additionalBody) Add Sleigh source to the body<T> SleighPcodeUseropDefinition<T> build()Build the actual definitionoverload()Start a new definition for a different signatureparams(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, waitMethods inherited from interface ghidra.pcode.exec.SleighPcodeUseropDefinition.BuilderStage1
params
-
Constructor Details
-
Builder
-
-
Method Details
-
params
Description copied from interface:SleighPcodeUseropDefinition.BuilderStage1Add parameters with the given names (to the end)- Specified by:
paramsin interfaceSleighPcodeUseropDefinition.BuilderStage1- Parameters:
additionalParams- the additional parameter names- Returns:
- the builder
-
body
public AbstractSleighPcodeUseropDefinition.Builder body(SleighPcodeUseropDefinition.BodyFunc additionalBody) Description copied from interface:SleighPcodeUseropDefinition.BuilderStage2Add Sleigh source to the body- Specified by:
bodyin interfaceSleighPcodeUseropDefinition.BuilderStage2- Parameters:
additionalBody- the additional source- Returns:
- the builder
-
overload
Description copied from interface:SleighPcodeUseropDefinition.BuilderStage2Start a new definition for a different signature- Specified by:
overloadin interfaceSleighPcodeUseropDefinition.BuilderStage2- Returns:
- the builder
-
build
Build the actual definitionNOTE: 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.
- Specified by:
buildin interfaceSleighPcodeUseropDefinition.BuilderStage2- Type Parameters:
T- no particular type, except to match the executor- Returns:
- the definition
-