Interface LookupSwitchInstruction

All Superinterfaces:
ClassFileElementPREVIEW, CodeElementPREVIEW, InstructionPREVIEW

public sealed interface LookupSwitchInstruction extends InstructionPREVIEW
LookupSwitchInstruction is a preview API of the Java platform.
Programs can only use LookupSwitchInstruction when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a lookupswitch instruction in the code array of a Code attribute. Delivered as a CodeElementPREVIEW when traversing the elements of a CodeModelPREVIEW.
Since:
22
  • Method Details

    • defaultTarget

      LabelPREVIEW defaultTarget()
      Returns the target of the default case.
      Returns:
      the target of the default case
    • 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 switch
      cases - the cases of the switch
      Returns:
      a lookup switch instruction