public class StaticTypesIsCaseWriter
extends Object
Emits the isCase call the type checker selected for a case
label, shared by the statically compiled switch expression and switch
statement writers so that a label resolves the same way in either position
(GROOVY-12407).
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static boolean |
writeDirectIsCase(WriterController controller, CaseStatement caseStatement, int selectorIndex, ClassNode selectorType)Emits the selected isCase as a direct method call via
StaticInvocationWriter.writeDirectMethodCall, leaving a boolean
on the operand stack for the following IFEQ. |
Emits the selected isCase as a direct method call via
StaticInvocationWriter.writeDirectMethodCall, leaving a boolean
on the operand stack for the following IFEQ.
controller - the writer controllercaseStatement - the arm whose label is being testedselectorIndex - local variable slot holding the switch selectorselectorType - type of that slotfalse when the type checker selected no target, in which
case the caller emits its own comparison; true when the
call was written