Module io.smallrye.classfile
Interface LookupSwitchInstruction
- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
Models a
If elements in
lookupswitch instruction in the
code array of a Code attribute. Delivered as a CodeElement
when traversing the elements of a CodeModel.
A lookup switch instruction is composite:
LookupSwitchInstruction(
Label defaultTarget,
List<SwitchCase> cases
)
cases are not sorted ascending by their caseValue, a sorted version of the cases list
will be written instead.- Since:
- 24
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncases()Returns the cases of the switch.Returns the target of the default case.static LookupSwitchInstructionof(Label defaultTarget, List<SwitchCase> cases) Returns a lookup switch instruction.Methods inherited from interface io.smallrye.classfile.Instruction
opcode, sizeInBytes
-
Method Details
-
defaultTarget
Label defaultTarget()Returns the target of the default case.- Returns:
- the target of the default case
-
cases
List<SwitchCase> cases()Returns the cases of the switch.- Returns:
- the cases of the switch
-
of
Returns a lookup switch instruction.- Parameters:
defaultTarget- the default target of the switchcases- the cases of the switch- Returns:
- a lookup switch instruction
-