Interface MethodBuilder

All Superinterfaces:
ClassFileBuilderPREVIEW<MethodElementPREVIEW,MethodBuilderPREVIEW>, Consumer<MethodElementPREVIEW>

public sealed interface MethodBuilder extends ClassFileBuilderPREVIEW<MethodElementPREVIEW,MethodBuilderPREVIEW>
MethodBuilder is a preview API of the Java platform.
Programs can only use MethodBuilder when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
A builder for methods. Builders are not created directly; they are passed to handlers by methods such as ClassBuilder.withMethod(Utf8Entry, Utf8Entry, int, Consumer)PREVIEW or to method transforms. The elements of a method can be specified abstractly (by passing a MethodElementPREVIEW to ClassFileBuilder.with(ClassFileElement)PREVIEW or concretely by calling the various withXxx methods.
Since:
22
See Also:
  • Method Details