Module java.base

Interface ConstantPoolBuilder

All Superinterfaces:
ClassFileElementPREVIEW, ConstantPoolPREVIEW, Iterable<PoolEntryPREVIEW>, WritableElementPREVIEW<ConstantPoolPREVIEW>

public sealed interface ConstantPoolBuilder extends ConstantPoolPREVIEW, WritableElementPREVIEW<ConstantPoolPREVIEW>
ConstantPoolBuilder is a preview API of the Java platform.
Programs can only use ConstantPoolBuilder when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Builder for the constant pool of a classfile. Provides read and write access to the constant pool that is being built. Writing is append-only and idempotent (entry-bearing methods will return an existing entry if there is one). A ConstantPoolBuilderPREVIEW is associated with a ClassBuilderPREVIEW. The ConstantPoolBuilderPREVIEW also provides access to some of the state of the ClassBuilderPREVIEW, such as classfile processing options.
Since:
22