Module org.glavo.classfile
Package org.glavo.classfile.instruction
Interface LookupSwitchInstruction
- All Superinterfaces:
ClassFileElement,CodeElement,Instruction
- All Known Implementing Classes:
AbstractInstruction.BoundLookupSwitchInstruction,AbstractInstruction.UnboundLookupSwitchInstruction
public sealed interface LookupSwitchInstruction
extends Instruction
permits AbstractInstruction.BoundLookupSwitchInstruction, AbstractInstruction.UnboundLookupSwitchInstruction
Models a
lookupswitch instruction in the code array of a
Code attribute. Delivered as a CodeElement when traversing
the elements of a CodeModel.- Since:
- 22
-
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 org.glavo.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
-