Package ghidra.pcode.emu.jit.gen.util
Record Class Methods.Def<MR,N>
java.lang.Object
java.lang.Record
ghidra.pcode.emu.jit.gen.util.Methods.Def<MR,N>
- Type Parameters:
MR- the return typeN- the parameter types, encoded as inEmitter- Record Components:
em- the emitter to be given once method definition moves into bytecode generationparams- the defined parameters so far
- Enclosing interface:
Methods
public static record Methods.Def<MR,N> (Emitter<Emitter.Bot> em, List<Methods.MthParam<?>> params)
extends Record
A static method definition (builder)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceA method reference for finishing a static method definitionstatic interfaceMethods.Def.ParamFunction<A0,T1 extends Types.BNonVoid, R> A method reference for defining a parameterstatic interfaceA method reference for finishing an instance method definition -
Constructor Summary
ConstructorsConstructorDescriptionDef(Emitter<Emitter.Bot> em, List<Methods.MthParam<?>> params) Creates an instance of aDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <MR extends Types.BType>
Methods.RetReqEm<MR> done(Methods.Def<MR, Emitter.Bot> mdef) Finish defining a static method and begin emitting bytecodestatic <MR extends Types.BType,OT>
Methods.RetReqEm<MR> done(Methods.ObjDef<MR, OT, Emitter.Bot> mdef, Types.TRef<OT> type, Consumer<Local<Types.TRef<OT>>> receiver) Finish defining an instance method and begin emitting bytecodeem()Returns the value of theemrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.<R> Rparam(Methods.Def.DoneFunction<? super Methods.Def<MR, N>, R> func) A syntactic workaround for static method chaining<R,T1 extends Types.BNonVoid>
Rparam(Methods.Def.ParamFunction<? super Methods.Def<MR, N>, T1, R> func, T1 type, String name, Consumer<Local<T1>> receiver) A syntactic workaround for static method chainingstatic <MR extends Types.BType,T1 extends Types.BNonVoid, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>>
Methods.Def<MR, N1> param(Methods.Def<MR, N0> mdef, T1 type, String name, Consumer<Local<T1>> receiver) Define a parameter for a static methodstatic <MR extends Types.BType,OT, T1 extends Types.BNonVoid, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>>
Methods.ObjDef<MR, OT, N1> param(Methods.ObjDef<MR, OT, N0> mdef, T1 type, String name, Consumer<Local<T1>> receiver) Define a parameter for an instance methodList<Methods.MthParam<?>> params()Returns the value of theparamsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
param
public static <MR extends Types.BType,T1 extends Types.BNonVoid, Methods.Def<MR,N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>> N1> param(Methods.Def<MR, N0> mdef, T1 type, String name, Consumer<Local<T1>> receiver) Define a parameter for a static method- Type Parameters:
MR- the return typeT1- the parameter typeN1- the remaining parameters still requiring definitionN0- the parameters remaining and the one being defined- Parameters:
mdef- the method definitiontype- the parameter typename- the namereceiver- a consumer to accept the declared local variable handle- Returns:
- the method definition
-
param
public static <MR extends Types.BType,OT, Methods.ObjDef<MR,T1 extends Types.BNonVoid, N1 extends Emitter.Next, N0 extends Emitter.Ent<N1, T1>> OT, paramN1> (Methods.ObjDef<MR, OT, N0> mdef, T1 type, String name, Consumer<Local<T1>> receiver) Define a parameter for an instance method- Type Parameters:
MR- the return typeOT- the owning typeT1- the parameter typeN1- the remaining parameters still requiring definitionN0- the parameters remaining and the one being defined- Parameters:
mdef- the method definitiontype- the parameter typename- the namereceiver- a consumer to accept the declared local variable handle- Returns:
- the method definition
-
done
Finish defining a static method and begin emitting bytecode- Type Parameters:
MR- the return type- Parameters:
mdef- the method definition- Returns:
- the return request and emitter typed with an empty stack
-
done
public static <MR extends Types.BType,OT> Methods.RetReqEm<MR> done(Methods.ObjDef<MR, OT, Emitter.Bot> mdef, Types.TRef<OT> type, Consumer<Local<Types.TRef<OT>>> receiver) Finish defining an instance method and begin emitting bytecode- Type Parameters:
MR- the return typeOT- the owning type- Parameters:
mdef- the method definitiontype- the owning type (for thisthis) parameterreceiver- a consumer to accept the declaredthislocal handle- Returns:
- the return request and emitter typed with an empty stack
-
param
public <R,T1 extends Types.BNonVoid> R param(Methods.Def.ParamFunction<? super Methods.Def<MR, N>, T1, R> func, T1 type, String name, Consumer<Local<T1>> receiver) A syntactic workaround for static method chaining- Type Parameters:
R- the return type offuncT1- the parameter type- Parameters:
func- the static method reference that actually processes the parametertype- the parameter typename- the namereceiver- the receiver- Returns:
- the return value from
func
-
param
A syntactic workaround for static method chaining- Type Parameters:
R- the return type offunc- Parameters:
func- the static method reference- Returns:
- the return value from
func
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
em
Returns the value of theemrecord component.- Returns:
- the value of the
emrecord component
-
params
Returns the value of theparamsrecord component.- Returns:
- the value of the
paramsrecord component
-