Interface CodeBuilder.BlockCodeBuilder

All Superinterfaces:
ClassfileBuilder<CodeElement,CodeBuilder>, CodeBuilder, Consumer<CodeElement>
All Known Implementing Classes:
BlockCodeBuilderImpl
Enclosing interface:
CodeBuilder

public static sealed interface CodeBuilder.BlockCodeBuilder extends CodeBuilder permits BlockCodeBuilderImpl
A builder for blocks of code.
  • Method Details

    • breakLabel

      Label breakLabel()
      Returns the label locating where control is passed back to the parent block.. A branch to this label "break"'s out of the current block.

      If an instruction occurring immediately after the built block's last instruction would be reachable from that last instruction, then a goto instruction targeting the "break" label is appended to the built block.

      Returns:
      the label locating where control is passed back to the parent block.