Module java.base

Interface CodeBuilder

All Superinterfaces:
ClassFileBuilderPREVIEW<CodeElementPREVIEW,CodeBuilderPREVIEW>, Consumer<CodeElementPREVIEW>
All Known Subinterfaces:
CodeBuilder.BlockCodeBuilderPREVIEW

public sealed interface CodeBuilder extends ClassFileBuilderPREVIEW<CodeElementPREVIEW,CodeBuilderPREVIEW> permits CodeBuilder.BlockCodeBuilderPREVIEW (not exhaustive)
CodeBuilder is a preview API of the Java platform.
Programs can only use CodeBuilder 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 code attributes (method bodies). Builders are not created directly; they are passed to handlers by methods such as MethodBuilder.withCode(Consumer)PREVIEW or to code transforms. The elements of a code can be specified abstractly, by passing a CodeElementPREVIEW to ClassFileBuilder.with(ClassFileElement)PREVIEW or concretely by calling the various withXxx methods.
Since:
22
See Also: