# Uses of Interface
java.lang.classfile.CodeBuilder.BlockCodeBuilder

Packages that use CodeBuilder.BlockCodeBuilderPREVIEW
Package
Description
java.lang.classfile
Provides classfile parsing, generation, and transformation library.

- ## Uses of CodeBuilder.BlockCodeBuilderPREVIEW in java.lang.classfilePREVIEW

  Method parameters in java.lang.classfilePREVIEW with type arguments of type CodeBuilder.BlockCodeBuilderPREVIEW
  Modifier and Type
  Method
  Description
  `default CodeBuilderPREVIEW`
  CodeBuilder.`block(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> handler)`
  Add a lexical block to the method being built.
  `CodeBuilder.CatchBuilderPREVIEW`
  CodeBuilder.CatchBuilder.`catching(ClassDesc exceptionType, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler)`
  Adds a catch block that catches an exception of the given type.
  `void`
  CodeBuilder.CatchBuilder.`catchingAll(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchAllHandler)`
  Adds a "catch" block that catches all exceptions.
  `CodeBuilder.CatchBuilderPREVIEW`
  CodeBuilder.CatchBuilder.`catchingMulti(List<ClassDesc> exceptionTypes, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> catchHandler)`
  Adds a catch block that catches exceptions of the given types.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`ifThen(OpcodePREVIEW opcode, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler)`
  Add an "if-then" block that is conditional on the value(s) on top of the operand stack in accordance with the given opcode.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`ifThen(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler)`
  Add an "if-then" block that is conditional on the boolean value on top of the operand stack.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`ifThenElse(OpcodePREVIEW opcode, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler)`
  Add an "if-then-else" block that is conditional on the value(s) on top of the operand stack in accordance with the given opcode.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`ifThenElse(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> thenHandler, Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> elseHandler)`
  Add an "if-then-else" block that is conditional on the boolean value on top of the operand stack.
  `default CodeBuilderPREVIEW`
  CodeBuilder.`trying(Consumer<CodeBuilder.BlockCodeBuilderPREVIEW> tryHandler, Consumer<CodeBuilder.CatchBuilderPREVIEW> catchesHandler)`
  Adds a "try-catch" block comprising one try block and zero or more catch blocks.