Module java.base

Interface ClassBuilder

All Superinterfaces:
ClassFileBuilderPREVIEW<ClassElementPREVIEW,ClassBuilderPREVIEW>, Consumer<ClassElementPREVIEW>

public sealed interface ClassBuilder extends ClassFileBuilderPREVIEW<ClassElementPREVIEW,ClassBuilderPREVIEW>
ClassBuilder is a preview API of the Java platform.
Programs can only use ClassBuilder 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 classfiles. Builders are not created directly; they are passed to handlers by methods such as ClassFile.build(ClassDesc, Consumer)PREVIEW or to class transforms. The elements of a classfile can be specified abstractly (by passing a ClassElementPREVIEW to ClassFileBuilder.with(ClassFileElement)PREVIEW) or concretely by calling the various withXxx methods.
Since:
22
See Also: