# Uses of Interface
java.lang.classfile.MethodBuilder

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

## Uses of MethodBuilder in java.lang.classfile

Subinterfaces with type arguments of type MethodBuilder in java.lang.classfile
Modifier and Type
Interface
Description
`interface`
`MethodBuilder`
A builder for methods.
`interface`
`MethodTransform`
A transformation on streams of `MethodElement`.
Methods in java.lang.classfile that return MethodBuilder
Modifier and Type
Method
Description
`MethodBuilder`
MethodBuilder.`transformCode(CodeModel code, CodeTransform transform)`
Build the method body for this method by transforming the body of another method.
`MethodBuilder`
MethodBuilder.`withCode(Consumer<? super CodeBuilder> code)`
Build the method body for this method.
`default MethodBuilder`
MethodBuilder.`withFlags(int flags)`
Sets the method access flags.
`default MethodBuilder`
MethodBuilder.`withFlags(AccessFlag... flags)`
Sets the method access flags.
Method parameters in java.lang.classfile with type arguments of type MethodBuilder
Modifier and Type
Method
Description
`static MethodTransform`
MethodTransform.`endHandler(Consumer<MethodBuilder> finisher)`
Creates a method transform that passes each element through to the builder, and calls the specified function when transformation is complete.
`ClassBuilder`
ClassBuilder.`withMethod(Utf8Entry name, Utf8Entry descriptor, int methodFlags, Consumer<? super MethodBuilder> handler)`
Adds a method.
`default ClassBuilder`
ClassBuilder.`withMethod(String name, MethodTypeDesc descriptor, int methodFlags, Consumer<? super MethodBuilder> handler)`
Adds a method.