Record Class Methods.Inv<MR extends Types.BType,SN extends Emitter.Next,MN extends Emitter.Next>
- Type Parameters:
MR- the return typeSN- the contents of the JVM stackMN- the unmatched parameters types remaining- Record Components:
em- the emitter, which will be given back when the invocation check is complete
- Enclosing interface:
Methods
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionem()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.static <MR extends Types.BNonVoid,SN extends Emitter.Next>
Emitter<Emitter.Ent<SN, MR>> ret(Methods.Inv<MR, SN, Emitter.Bot> inv) Finish checking an invocation of a static methodstatic <RT extends Types.BNonVoid,SN extends Emitter.Next>
Emitter<Emitter.Ent<SN, RT>> retQ(Methods.Inv<?, SN, ?> inv, RT returnType) Finish invocation of a static method without checkingstatic <SN extends Emitter.Next>
Emitter<SN> retQVoid(Methods.Inv<?, SN, ?> inv) Finish an invocation of a static void method without checkingstatic <SN extends Emitter.Next>
Emitter<SN> retVoid(Methods.Inv<Types.TVoid, SN, Emitter.Bot> inv) Finish checking an invocation of a static void method<R,A1> R step(BiFunction<? super Methods.Inv<MR, SN, MN>, A1, R> func, A1 arg1) A syntactic workaround for static method chaining<R> RA syntactic workaround for static method chainingstatic <P1 extends Types.BNonVoid,A1 extends P1, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>>
Methods.Inv<MR, SN1, MN1> takeArg(Methods.Inv<MR, SN0, MN0> inv) Pop an argument and match/check it against the next (right-most unmatched) parameterstatic <OT,P1 extends Types.BNonVoid, A1 extends P1, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>>
Methods.ObjInv<MR, OT, SN1, MN1> takeArg(Methods.ObjInv<MR, OT, SN0, MN0> inv) Pop an argument and match/check it against the next (right-most unmatched) parameterstatic <OT,MR extends Types.BType, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ? extends Types.TRef<? extends OT>>>
Methods.Inv<MR, SN1, Emitter.Bot> takeObjRef(Methods.ObjInv<MR, OT, SN0, Emitter.Bot> inv) Pop the object reference from the stack and check it against the owning typestatic <MR extends Types.BType,SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ?>>
Methods.Inv<MR, SN1, ?> takeQArg(Methods.Inv<MR, SN0, ?> inv) Pop an argument and a parameter without checkingstatic <OT,MR extends Types.BType, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ?>>
Methods.ObjInv<MR, OT, SN1, ?> takeQArg(Methods.ObjInv<MR, OT, SN0, ?> inv) Pop an argument and a parameter without checkingstatic <OT,MR extends Types.BType, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ? extends Types.TRef<? extends OT>>>
Methods.Inv<MR, SN1, Emitter.Bot> takeQObjRef(Methods.ObjInv<MR, OT, SN0, ?> inv) Pop the object reference from the stack without checking itstatic <PT,AT extends PT, P1 extends Types.TRef<PT>, A1 extends Types.TRef<AT>, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>>
Methods.Inv<MR, SN1, MN1> takeRefArg(Methods.Inv<MR, SN0, MN0> inv) Pop a polymorphic reference argument and match/check it against the next (right-most unmatched parameter)static <OT,PT, AT extends PT, P1 extends Types.TRef<PT>, A1 extends Types.TRef<AT>, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>>
Methods.ObjInv<MR, OT, SN1, MN1> takeRefArg(Methods.ObjInv<MR, OT, SN0, MN0> inv) Pop a polymorphic reference argument and match/check it against the next (right-most unmatched parameter)final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Inv
Creates an instance of aInvrecord class.- Parameters:
em- the value for theemrecord component
-
-
Method Details
-
takeArg
public static <P1 extends Types.BNonVoid,A1 extends P1, Methods.Inv<MR,MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>> SN1, takeArgMN1> (Methods.Inv<MR, SN0, MN0> inv) Pop an argument and match/check it against the next (right-most unmatched) parameterNOTE: This will not work for polymorphic arguments. For ref-typed arguments, use
takeRefArg(Inv).- Type Parameters:
P1- the parameter type popped from the remaining parameter typesA1- the argument type popped from the stack contentsMR- the return typeMN1- the new remaining parameter typesMN0- the current parameter types having the popped parameter on topSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeQArg
public static <MR extends Types.BType,SN1 extends Emitter.Next, Methods.Inv<MR,SN0 extends Emitter.Ent<SN1, ?>> SN1, takeQArg?> (Methods.Inv<MR, SN0, ?> inv) Pop an argument and a parameter without checkingNOTE: This should only be used with
Methods.MthDesc.reflect(Method). When dealing with a parameter list whose length is only known at runtime, recursion should be favored, so that each argument pushed by the emitter is provably paired with a parameter denoted by calling this method.- Type Parameters:
MR- the return typeSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeRefArg
public static <PT,AT extends PT, Methods.Inv<MR,P1 extends Types.TRef<PT>, A1 extends Types.TRef<AT>, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>> SN1, takeRefArgMN1> (Methods.Inv<MR, SN0, MN0> inv) Pop a polymorphic reference argument and match/check it against the next (right-most unmatched parameter)- Type Parameters:
PT- the parameter's object typeAT- the argument's object typeP1- the parameter type popped from the remaining parameter typesA1- the argument type popped from the stack contentsMR- the return typeMN1- the new remaining parameter typesMN0- the current parameter types having the popped parameter on topSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeArg
public static <OT,P1 extends Types.BNonVoid, Methods.ObjInv<MR,A1 extends P1, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>> OT, takeArgSN1, MN1> (Methods.ObjInv<MR, OT, SN0, MN0> inv) Pop an argument and match/check it against the next (right-most unmatched) parameterNOTE: This will not work for polymorphic arguments. For ref-typed arguments, use
takeRefArg(ObjInv).- Type Parameters:
OT- the method's owning typeP1- the parameter type popped from the remaining parameter typesA1- the argument type popped from the stack contentsMR- the return typeMN1- the new remaining parameter typesMN0- the current parameter types having the popped parameter on topSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeRefArg
public static <OT,PT, Methods.ObjInv<MR,AT extends PT, P1 extends Types.TRef<PT>, A1 extends Types.TRef<AT>, MR extends Types.BType, MN1 extends Emitter.Next, MN0 extends Emitter.Ent<MN1, P1>, SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, A1>> OT, takeRefArgSN1, MN1> (Methods.ObjInv<MR, OT, SN0, MN0> inv) Pop a polymorphic reference argument and match/check it against the next (right-most unmatched parameter)- Type Parameters:
OT- the method's owning typePT- the parameter's object typeAT- the argument's object typeP1- the parameter type popped from the remaining parameter typesA1- the argument type popped from the stack contentsMR- the return typeMN1- the new remaining parameter typesMN0- the current parameter types having the popped parameter on topSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeQArg
public static <OT,MR extends Types.BType, Methods.ObjInv<MR,SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ?>> OT, takeQArgSN1, ?> (Methods.ObjInv<MR, OT, SN0, ?> inv) Pop an argument and a parameter without checkingNOTE: This should only be used with
Methods.MthDesc.reflect(Method). When dealing with a parameter list whose length is only known at runtime, recursion should be favored, so that each argument pushed by the emitter is provably paired with a parameter denoted by calling this method.- Type Parameters:
OT- the method's owning typeMR- the return typeSN1- the new remaining stack contentsSN0- the current stack contents having the popped argument on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining parameters and stack contents
-
takeObjRef
public static <OT,MR extends Types.BType, Methods.Inv<MR,SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ? extends Types.TRef<? extends OT>>> SN1, takeObjRefEmitter.Bot> (Methods.ObjInv<MR, OT, SN0, Emitter.Bot> inv) Pop the object reference from the stack and check it against the owning typeThis must be used, but only once the parameter type list is empty
- Type Parameters:
OT- the method's owning typeMR- the return typeSN1- the new remaining stack contentsSN0- the current stack contents having popped the reference on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining stack contents
-
takeQObjRef
public static <OT,MR extends Types.BType, Methods.Inv<MR,SN1 extends Emitter.Next, SN0 extends Emitter.Ent<SN1, ? extends Types.TRef<? extends OT>>> SN1, takeQObjRefEmitter.Bot> (Methods.ObjInv<MR, OT, SN0, ?> inv) Pop the object reference from the stack without checking itNOTE: This should only be used with
Methods.MthDesc.reflect(Method). This must be used, but only when sufficient arguments have been popped to satisfy the reflected parameters. It is up to the caller to know how many arguments are expected.- Type Parameters:
OT- the method's owning typeMR- the return typeSN1- the new remaining stack contentsSN0- the current stack contents having popped the reference on top- Parameters:
inv- the invocation object- Returns:
- the invocation object with remaining stack contents
-
retVoid
public static <SN extends Emitter.Next> Emitter<SN> retVoid(Methods.Inv<Types.TVoid, SN, Emitter.Bot> inv) Finish checking an invocation of a static void method- Type Parameters:
SN- the stack contents after the invocation- Parameters:
inv- the invocation object- Returns:
- the emitter typed with the resulting stack
-
retQVoid
Finish an invocation of a static void method without checkingNOTE: This should only be used with
Methods.MthDesc.reflect(Method).- Type Parameters:
SN- the stack contents after the invocation- Parameters:
inv- the invocation object- Returns:
- the emitter typed with the resulting stack
-
ret
public static <MR extends Types.BNonVoid,SN extends Emitter.Next> Emitter<Emitter.Ent<SN,MR>> ret(Methods.Inv<MR, SN, Emitter.Bot> inv) Finish checking an invocation of a static method- Type Parameters:
MR- the return typeSN- the stack contents before pushing the returned result- Parameters:
inv- the invocation object- Returns:
- the emitter typed with the resulting stack, i.e., having pushed the returned value
-
retQ
public static <RT extends Types.BNonVoid,SN extends Emitter.Next> Emitter<Emitter.Ent<SN,RT>> retQ(Methods.Inv<?, SN, ?> inv, RT returnType) Finish invocation of a static method without checkingNOTE: This should only be used with
Methods.MthDesc.reflect(Method).- Type Parameters:
RT- the asserted return typeSN- the stack contents before pushing the returned result- Parameters:
inv- the invocation objectreturnType- the asserted return type- Returns:
- the emitter typed with the resulting stack, i.e., having pushed the returned value
-
step
A syntactic workaround for static method chaining- Type Parameters:
R- the return type offunc- Parameters:
func- the method to invoke- Returns:
- the return value from
func
-
step
A syntactic workaround for static method chaining- Type Parameters:
R- the return type offuncA1- the first argument type offunc- Parameters:
func- the method to invokearg1- the first argument tofunc- 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
-