- All Superinterfaces:
SimpleTyped,Typed
A creator for a
switch statement.
The individual switch cases do not fall through.
To simulate fall-through behavior, use BlockCreator.gotoCase(SwitchCreator, Const)
or one of its variants at the end of each case.-
Method Summary
Modifier and TypeMethodDescriptionvoidcase_(Consumer<CaseCreator> builder) Add a switch case.default voidcaseOf(int val, Consumer<BlockCreator> body) Add a simple switch case.default voidcaseOf(long val, Consumer<BlockCreator> body) Add a simple switch case.default voidcaseOf(Const val, Consumer<BlockCreator> body) Add a simple switch case.default voidcaseOf(Constable val, Consumer<BlockCreator> body) Add a simple switch case.default voidcaseOf(ConstantDesc val, Consumer<BlockCreator> body) Add a simple switch case.default voidcaseOf(String val, Consumer<BlockCreator> body) Add a simple switch case.voiddefault_(Consumer<BlockCreator> body) Add the default case.Methods inherited from interface io.quarkus.gizmo2.SimpleTyped
isPrimitive, isVoid, slotSize, type, typeKind
-
Method Details
-
case_
Add a switch case.- Parameters:
builder- the switch case builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
caseOf
Add a simple switch case.- Parameters:
val- the case value to add (must not benull)body- the switch case body builder (must not benull)
-
default_
Add the default case.- Parameters:
body- the builder for the body of the default case (must not benull)
-