# Uses of Interface
java.lang.classfile.MethodBuilder

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

- ## Uses of MethodBuilderPREVIEW in java.lang.classfilePREVIEW

  Methods in java.lang.classfilePREVIEW that return MethodBuilderPREVIEW
  Modifier and Type
  Method
  Description
  `MethodBuilderPREVIEW`
  MethodBuilder.`transformCode(CodeModelPREVIEW code, CodeTransformPREVIEW transform)`
  Build the method body for this method by transforming the body of another method.
  `MethodBuilderPREVIEW`
  MethodBuilder.`withCode(Consumer<? super CodeBuilderPREVIEW> code)`
  Build the method body for this method.
  `default MethodBuilderPREVIEW`
  MethodBuilder.`withFlags(int flags)`
  Sets the method access flags.
  `default MethodBuilderPREVIEW`
  MethodBuilder.`withFlags(AccessFlag... flags)`
  Sets the method access flags.
  Methods in java.lang.classfilePREVIEW with parameters of type MethodBuilderPREVIEW
  Modifier and Type
  Method
  Description
  `default ClassFileTransform.ResolvedTransformPREVIEW<MethodElementPREVIEW>`
  MethodTransform.`resolve(MethodBuilderPREVIEW builder)`
  Method parameters in java.lang.classfilePREVIEW with type arguments of type MethodBuilderPREVIEW
  Modifier and Type
  Method
  Description
  `static MethodTransformPREVIEW`
  MethodTransform.`endHandler(Consumer<MethodBuilderPREVIEW> finisher)`
  Create a method transform that passes each element through to the builder, and calls the specified function when transformation is complete.
  `ClassBuilderPREVIEW`
  ClassBuilder.`withMethod(Utf8EntryPREVIEW name, Utf8EntryPREVIEW descriptor, int methodFlags, Consumer<? super MethodBuilderPREVIEW> handler)`
  Adds a method.
  `default ClassBuilderPREVIEW`
  ClassBuilder.`withMethod(String name, MethodTypeDesc descriptor, int methodFlags, Consumer<? super MethodBuilderPREVIEW> handler)`
  Adds a method.