Interface SwitchCase


public sealed interface SwitchCase
Models a single case in a lookupswitch or tableswitch instruction.

A switch case is composite:

SwitchCase(
    int caseValue,
    Label target
)
Since:
24
See Also:
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    int
    Returns the integer value corresponding to this case.
    static SwitchCase
    of(int caseValue, Label target)
    Returns a new switch case.
    Returns the branch target corresponding to this case.
  • Method Details Link icon

    • caseValue Link icon

      int caseValue()
      Returns the integer value corresponding to this case.
      Returns:
      the integer value corresponding to this case
    • target Link icon

      Label target()
      Returns the branch target corresponding to this case.
      Returns:
      the branch target corresponding to this case
    • of Link icon

      static SwitchCase of(int caseValue, Label target)
      Returns a new switch case.
      Parameters:
      caseValue - the integer value for the case
      target - the branch target for the case
      Returns:
      a new switch case