Package Summary Overview Summary

Module java.base
Package java.lang.classfile.constantpoolPREVIEW

# 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 `ClassBuilder`PREVIEW. The ConstantPoolBuilderPREVIEW also provides access to some of the state of the ClassBuilderPREVIEW, such as classfile processing options.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default AnnotationConstantValueEntryPREVIEW`
  `annotationConstantValueEntry (ConstantDesc c)`
  Returns An `AnnotationConstantValueEntry`PREVIEW describing the provided constant.
  `BootstrapMethodEntryPREVIEW`
  `bsmEntry (MethodHandleEntryPREVIEW methodReference, List<LoadableConstantEntryPREVIEW> arguments)`
  Returns a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments.
  `default BootstrapMethodEntryPREVIEW`
  `bsmEntry (DirectMethodHandleDesc methodReference, List<ConstantDesc> arguments)`
  Returns a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments.
  `boolean`
  `canWriteDirect (ConstantPoolPREVIEW constantPool)`
  Returns whether the provided constant pool is index-compatible with this one.
  `ClassEntryPREVIEW`
  `classEntry (Utf8EntryPREVIEW ne)`
  Returns A `ClassEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW.
  `default ClassEntryPREVIEW`
  `classEntry (ClassDesc classDesc)`
  Returns A `ClassEntry`PREVIEW describing the class described by provided ClassDesc.
  `ConstantDynamicEntryPREVIEW`
  `constantDynamicEntry (BootstrapMethodEntryPREVIEW bootstrapMethodEntry, NameAndTypeEntryPREVIEW nameAndType)`
  Returns A `ConstantDynamicEntry`PREVIEW describing a dynamic constant.
  `default ConstantDynamicEntryPREVIEW`
  `constantDynamicEntry (DynamicConstantDesc<?> dcd)`
  Returns A `ConstantDynamicEntry`PREVIEW describing a dynamic constant.
  `default ConstantValueEntryPREVIEW`
  `constantValueEntry (ConstantDesc c)`
  Returns A `ConstantValueEntry`PREVIEW descripbing the provided Integer, Long, Float, Double, or String constant.
  `DoubleEntryPREVIEW`
  `doubleEntry (double value)`
  Returns A `DoubleEntry`PREVIEW describing the provided value.
  `FieldRefEntryPREVIEW`
  `fieldRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)`
  Returns A `FieldRefEntry`PREVIEW describing a field of a class.
  `default FieldRefEntryPREVIEW`
  `fieldRefEntry (ClassDesc owner, String name, ClassDesc type)`
  Returns A `FieldRefEntry`PREVIEW describing a field of a class.
  `FloatEntryPREVIEW`
  `floatEntry (float value)`
  Returns A `FloatEntry`PREVIEW describing the provided value.
  `IntegerEntryPREVIEW`
  `intEntry (int value)`
  Returns An `IntegerEntry`PREVIEW describing the provided value.
  `InterfaceMethodRefEntryPREVIEW`
  `interfaceMethodRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)`
  Returns A `InterfaceMethodRefEntry`PREVIEW describing a method of a class.
  `default InterfaceMethodRefEntryPREVIEW`
  `interfaceMethodRefEntry (ClassDesc owner, String name, MethodTypeDesc type)`
  Returns A `InterfaceMethodRefEntry`PREVIEW describing a method of a class.
  `InvokeDynamicEntryPREVIEW`
  `invokeDynamicEntry (BootstrapMethodEntryPREVIEW bootstrapMethodEntry, NameAndTypeEntryPREVIEW nameAndType)`
  Returns An `InvokeDynamicEntry`PREVIEW describing a dynamic call site.
  `default InvokeDynamicEntryPREVIEW`
  `invokeDynamicEntry (DynamicCallSiteDesc dcsd)`
  Returns An `InvokeDynamicEntry`PREVIEW describing a dynamic call site.
  `default LoadableConstantEntryPREVIEW`
  `loadableConstantEntry (ConstantDesc c)`
  Returns A `LoadableConstantEntry`PREVIEW describing the provided constant.
  `LongEntryPREVIEW`
  `longEntry (long value)`
  Returns A `LongEntry`PREVIEW describing the provided value.
  `MethodHandleEntryPREVIEW`
  `methodHandleEntry (int refKind, MemberRefEntryPREVIEW reference)`
  Returns A `MethodHandleEntry`PREVIEW describing a field accessor or method.
  `default MethodHandleEntryPREVIEW`
  `methodHandleEntry (DirectMethodHandleDesc descriptor)`
  Returns A `MethodHandleEntry`PREVIEW describing a direct method handle.
  `MethodRefEntryPREVIEW`
  `methodRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)`
  Returns A `MethodRefEntry`PREVIEW describing a method of a class.
  `default MethodRefEntryPREVIEW`
  `methodRefEntry (ClassDesc owner, String name, MethodTypeDesc type)`
  Returns A `MethodRefEntry`PREVIEW describing a method of a class.
  `MethodTypeEntryPREVIEW`
  `methodTypeEntry (Utf8EntryPREVIEW descriptor)`
  Returns A `MethodTypeEntry`PREVIEW describing a method type.
  `MethodTypeEntryPREVIEW`
  `methodTypeEntry (MethodTypeDesc descriptor)`
  Returns A `MethodTypeEntry`PREVIEW describing a method type.
  `ModuleEntryPREVIEW`
  `moduleEntry (Utf8EntryPREVIEW moduleName)`
  Returns A `ModuleEntry`PREVIEW describing the module whose name is encoded in the provided Utf8EntryPREVIEW.
  `default ModuleEntryPREVIEW`
  `moduleEntry (ModuleDesc moduleDesc)`
  Returns A `ModuleEntry`PREVIEW describing the module described by provided ModuleDesc.
  `NameAndTypeEntryPREVIEW`
  `nameAndTypeEntry (Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW typeEntry)`
  Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type.
  `default NameAndTypeEntryPREVIEW`
  `nameAndTypeEntry (String name, ClassDesc type)`
  Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type.
  `default NameAndTypeEntryPREVIEW`
  `nameAndTypeEntry (String name, MethodTypeDesc type)`
  Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type.
  `static ConstantPoolBuilderPREVIEW`
  `of()`
  Returns a new constant pool builder.
  `static ConstantPoolBuilderPREVIEW`
  `of (ClassModelPREVIEW classModel)`
  Returns a new constant pool builder.
  `PackageEntryPREVIEW`
  `packageEntry (Utf8EntryPREVIEW nameEntry)`
  Returns A `PackageEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW.
  `default PackageEntryPREVIEW`
  `packageEntry (PackageDesc packageDesc)`
  Returns A `PackageEntry`PREVIEW describing the class described by provided PackageDesc.
  `StringEntryPREVIEW`
  `stringEntry (Utf8EntryPREVIEW utf8)`
  Returns A `StringEntry`PREVIEW referencing the provided UTF8 entry.
  `default StringEntryPREVIEW`
  `stringEntry (String value)`
  Returns A `StringEntry`PREVIEW describing the provided value.
  `default Utf8EntryPREVIEW`
  `utf8Entry (ClassDesc desc)`
  Returns A `Utf8Entry`PREVIEW describing the field descriptor of the provided ClassDesc.
  `default Utf8EntryPREVIEW`
  `utf8Entry (MethodTypeDesc desc)`
  Returns A `Utf8Entry`PREVIEW describing the method descriptor of the provided MethodTypeDesc.
  `Utf8EntryPREVIEW`
  `utf8Entry (String s)`
  Returns A `Utf8Entry`PREVIEW describing the provided String.
  `boolean`
  `writeBootstrapMethods (BufWriterPREVIEW buf)`
  Writes associated bootstrap method entries to the specified writer

  ### Methods declared in interface java.lang.classfile.constantpool.ConstantPoolPREVIEW

  `bootstrapMethodCount, bootstrapMethodEntry, entryByIndex, iterator, size`

  ### Methods declared in interface java.lang.Iterable

  `forEach, spliterator`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### of

    static ConstantPoolBuilderPREVIEW of (ClassModelPREVIEW classModel)
    Returns a new constant pool builder. The new constant pool builder will be pre-populated with the contents of the constant pool associated with the class reader.
    Parameters:
      `classModel` - the class to copy from
    Returns:
      a new constant pool builder

  - ### of

    static ConstantPoolBuilderPREVIEW of()
    Returns a new constant pool builder. The new constant pool builder will be empty.
    Returns:
      a new constant pool builder

  - ### canWriteDirect

    boolean canWriteDirect (ConstantPoolPREVIEW constantPool)
    Returns whether the provided constant pool is index-compatible with this one. This may be because they are the same constant pool, or because this constant pool was copied from the other.
    Parameters:
      `constantPool` - the other constant pool
    Returns:
      whether the provided constant pool is index-compatible with this one

  - ### writeBootstrapMethods

    boolean writeBootstrapMethods (BufWriterPREVIEW buf)
    Writes associated bootstrap method entries to the specified writer
    Parameters:
      `buf` - the writer
    Returns:
      false when no bootstrap method entry has been written

  - ### utf8Entry

    Utf8EntryPREVIEW utf8Entry (String s)
    Returns A `Utf8Entry`PREVIEW describing the provided String. If a UTF8 entry in the pool already describes this string, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `s` - the string
    Returns:
      A `Utf8Entry`PREVIEW describing the provided String

  - ### utf8Entry

    default Utf8EntryPREVIEW utf8Entry (ClassDesc desc)
    Returns A `Utf8Entry`PREVIEW describing the field descriptor of the provided ClassDesc. If a UTF8 entry in the pool already describes this field descriptor, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `desc` - the symbolic descriptor for the class
    Returns:
      A `Utf8Entry`PREVIEW describing the field descriptor of the provided ClassDesc

  - ### utf8Entry

    default Utf8EntryPREVIEW utf8Entry (MethodTypeDesc desc)
    Returns A `Utf8Entry`PREVIEW describing the method descriptor of the provided MethodTypeDesc. If a UTF8 entry in the pool already describes this field descriptor, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `desc` - the symbolic descriptor for the method type
    Returns:
      A `Utf8Entry`PREVIEW describing the method descriptor of the provided MethodTypeDesc

  - ### classEntry

    ClassEntryPREVIEW classEntry (Utf8EntryPREVIEW ne)
    Returns A `ClassEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW. If a Class entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `ne` - the constant pool entry describing the internal name of the class
    Returns:
      A `ClassEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW

  - ### classEntry

    default ClassEntryPREVIEW classEntry (ClassDesc classDesc)
    Returns A `ClassEntry`PREVIEW describing the class described by provided ClassDesc. If a Class entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `classDesc` - the symbolic descriptor for the class
    Returns:
      A `ClassEntry`PREVIEW describing the class described by provided ClassDesc
    Throws:
      `IllegalArgumentException` - if `classDesc` represents a primitive type

  - ### packageEntry

    PackageEntryPREVIEW packageEntry (Utf8EntryPREVIEW nameEntry)
    Returns A `PackageEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW. If a Package entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `nameEntry` - the constant pool entry describing the internal name of the package
    Returns:
      A `PackageEntry`PREVIEW describing the class whose internal name is encoded in the provided Utf8EntryPREVIEW

  - ### packageEntry

    default PackageEntryPREVIEW packageEntry (PackageDesc packageDesc)
    Returns A `PackageEntry`PREVIEW describing the class described by provided PackageDesc. If a Package entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `packageDesc` - the symbolic descriptor for the class
    Returns:
      A `PackageEntry`PREVIEW describing the class described by provided PackageDesc

  - ### moduleEntry

    ModuleEntryPREVIEW moduleEntry (Utf8EntryPREVIEW moduleName)
    Returns A `ModuleEntry`PREVIEW describing the module whose name is encoded in the provided Utf8EntryPREVIEW. If a module entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `moduleName` - the constant pool entry describing the module name
    Returns:
      A `ModuleEntry`PREVIEW describing the module whose name is encoded in the provided Utf8EntryPREVIEW

  - ### moduleEntry

    default ModuleEntryPREVIEW moduleEntry (ModuleDesc moduleDesc)
    Returns A `ModuleEntry`PREVIEW describing the module described by provided ModuleDesc. If a module entry in the pool already describes this class, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `moduleDesc` - the symbolic descriptor for the class
    Returns:
      A `ModuleEntry`PREVIEW describing the module described by provided ModuleDesc

  - ### nameAndTypeEntry

    NameAndTypeEntryPREVIEW nameAndTypeEntry (Utf8EntryPREVIEW nameEntry, Utf8EntryPREVIEW typeEntry)
    Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type. If a NameAndType entry in the pool already describes this name and type, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `nameEntry` - the member name
      `typeEntry` - the member field or method descriptor
    Returns:
      A `NameAndTypeEntry`PREVIEW describing the provided name and type

  - ### nameAndTypeEntry

    default NameAndTypeEntryPREVIEW nameAndTypeEntry (String name, ClassDesc type)
    Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type. If a NameAndType entry in the pool already describes this name and type, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `name` - the member name
      `type` - the symbolic descriptor for a field type
    Returns:
      A `NameAndTypeEntry`PREVIEW describing the provided name and type

  - ### nameAndTypeEntry

    default NameAndTypeEntryPREVIEW nameAndTypeEntry (String name, MethodTypeDesc type)
    Returns A `NameAndTypeEntry`PREVIEW describing the provided name and type. If a NameAndType entry in the pool already describes this name and type, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `name` - the member name
      `type` - the symbolic descriptor for a method type
    Returns:
      A `NameAndTypeEntry`PREVIEW describing the provided name and type

  - ### fieldRefEntry

    FieldRefEntryPREVIEW fieldRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)
    Returns A `FieldRefEntry`PREVIEW describing a field of a class. If a FieldRef entry in the pool already describes this field, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the field is a member of
      `nameAndType` - the name and type of the field
    Returns:
      A `FieldRefEntry`PREVIEW describing a field of a class

  - ### fieldRefEntry

    default FieldRefEntryPREVIEW fieldRefEntry (ClassDesc owner, String name, ClassDesc type)
    Returns A `FieldRefEntry`PREVIEW describing a field of a class. If a FieldRef entry in the pool already describes this field, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the field is a member of
      `name` - the name of the field
      `type` - the type of the field
    Returns:
      A `FieldRefEntry`PREVIEW describing a field of a class
    Throws:
      `IllegalArgumentException` - if `owner` represents a primitive type

  - ### methodRefEntry

    MethodRefEntryPREVIEW methodRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)
    Returns A `MethodRefEntry`PREVIEW describing a method of a class. If a MethodRefEntry entry in the pool already describes this method, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the method is a member of
      `nameAndType` - the name and type of the method
    Returns:
      A `MethodRefEntry`PREVIEW describing a method of a class

  - ### methodRefEntry

    default MethodRefEntryPREVIEW methodRefEntry (ClassDesc owner, String name, MethodTypeDesc type)
    Returns A `MethodRefEntry`PREVIEW describing a method of a class. If a MethodRefEntry entry in the pool already describes this method, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the method is a member of
      `name` - the name of the method
      `type` - the type of the method
    Returns:
      A `MethodRefEntry`PREVIEW describing a method of a class
    Throws:
      `IllegalArgumentException` - if `owner` represents a primitive type

  - ### interfaceMethodRefEntry

    InterfaceMethodRefEntryPREVIEW interfaceMethodRefEntry (ClassEntryPREVIEW owner, NameAndTypeEntryPREVIEW nameAndType)
    Returns A `InterfaceMethodRefEntry`PREVIEW describing a method of a class. If a InterfaceMethodRefEntry entry in the pool already describes this method, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the method is a member of
      `nameAndType` - the name and type of the method
    Returns:
      A `InterfaceMethodRefEntry`PREVIEW describing a method of a class

  - ### interfaceMethodRefEntry

    default InterfaceMethodRefEntryPREVIEW interfaceMethodRefEntry (ClassDesc owner, String name, MethodTypeDesc type)
    Returns A `InterfaceMethodRefEntry`PREVIEW describing a method of a class. If a InterfaceMethodRefEntry entry in the pool already describes this method, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `owner` - the class the method is a member of
      `name` - the name of the method
      `type` - the type of the method
    Returns:
      A `InterfaceMethodRefEntry`PREVIEW describing a method of a class
    Throws:
      `IllegalArgumentException` - if `owner` represents a primitive type

  - ### methodTypeEntry

    MethodTypeEntryPREVIEW methodTypeEntry (MethodTypeDesc descriptor)
    Returns A `MethodTypeEntry`PREVIEW describing a method type. If a MethodType entry in the pool already describes this method type, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `descriptor` - the symbolic descriptor of the method type
    Returns:
      A `MethodTypeEntry`PREVIEW describing a method type

  - ### methodTypeEntry

    MethodTypeEntryPREVIEW methodTypeEntry (Utf8EntryPREVIEW descriptor)
    Returns A `MethodTypeEntry`PREVIEW describing a method type. If a MethodType entry in the pool already describes this method type, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `descriptor` - the constant pool entry for the method type descriptor
    Returns:
      A `MethodTypeEntry`PREVIEW describing a method type

  - ### methodHandleEntry

    default MethodHandleEntryPREVIEW methodHandleEntry (DirectMethodHandleDesc descriptor)
    Returns A `MethodHandleEntry`PREVIEW describing a direct method handle. If a MethodHandle entry in the pool already describes this method handle, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `descriptor` - the symbolic descriptor of the method handle
    Returns:
      A `MethodHandleEntry`PREVIEW describing a direct method handle

  - ### methodHandleEntry

    MethodHandleEntryPREVIEW methodHandleEntry (int refKind, MemberRefEntryPREVIEW reference)
    Returns A `MethodHandleEntry`PREVIEW describing a field accessor or method. If a MethodHandle entry in the pool already describes this method handle, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `refKind` - the reference kind of the method handle 4.4.8
      `reference` - the constant pool entry describing the field or method
    Returns:
      A `MethodHandleEntry`PREVIEW describing a field accessor or method

  - ### invokeDynamicEntry

    default InvokeDynamicEntryPREVIEW invokeDynamicEntry (DynamicCallSiteDesc dcsd)
    Returns An `InvokeDynamicEntry`PREVIEW describing a dynamic call site. If an InvokeDynamic entry in the pool already describes this site, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `dcsd` - the symbolic descriptor of the method handle
    Returns:
      An `InvokeDynamicEntry`PREVIEW describing a dynamic call site

  - ### invokeDynamicEntry

    InvokeDynamicEntryPREVIEW invokeDynamicEntry (BootstrapMethodEntryPREVIEW bootstrapMethodEntry, NameAndTypeEntryPREVIEW nameAndType)
    Returns An `InvokeDynamicEntry`PREVIEW describing a dynamic call site. If an InvokeDynamic entry in the pool already describes this site, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `bootstrapMethodEntry` - the entry in the bootstrap method table
      `nameAndType` - the invocation name and type
    Returns:
      An `InvokeDynamicEntry`PREVIEW describing a dynamic call site

  - ### constantDynamicEntry

    default ConstantDynamicEntryPREVIEW constantDynamicEntry (DynamicConstantDesc<?> dcd)
    Returns A `ConstantDynamicEntry`PREVIEW describing a dynamic constant. If a ConstantDynamic entry in the pool already describes this site, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `dcd` - the symbolic descriptor of the constant
    Returns:
      A `ConstantDynamicEntry`PREVIEW describing a dynamic constant

  - ### constantDynamicEntry

    ConstantDynamicEntryPREVIEW constantDynamicEntry (BootstrapMethodEntryPREVIEW bootstrapMethodEntry, NameAndTypeEntryPREVIEW nameAndType)
    Returns A `ConstantDynamicEntry`PREVIEW describing a dynamic constant. If a ConstantDynamic entry in the pool already describes this site, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `bootstrapMethodEntry` - the entry in the bootstrap method table
      `nameAndType` - the invocation name and type
    Returns:
      A `ConstantDynamicEntry`PREVIEW describing a dynamic constant

  - ### intEntry

    IntegerEntryPREVIEW intEntry (int value)
    Returns An `IntegerEntry`PREVIEW describing the provided value. If an integer entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `value` - the value
    Returns:
      An `IntegerEntry`PREVIEW describing the provided value

  - ### floatEntry

    FloatEntryPREVIEW floatEntry (float value)
    Returns A `FloatEntry`PREVIEW describing the provided value. If a float entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `value` - the value
    Returns:
      A `FloatEntry`PREVIEW describing the provided value

  - ### longEntry

    LongEntryPREVIEW longEntry (long value)
    Returns A `LongEntry`PREVIEW describing the provided value. If a long entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `value` - the value
    Returns:
      A `LongEntry`PREVIEW describing the provided value

  - ### doubleEntry

    DoubleEntryPREVIEW doubleEntry (double value)
    Returns A `DoubleEntry`PREVIEW describing the provided value. If a double entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `value` - the value
    Returns:
      A `DoubleEntry`PREVIEW describing the provided value

  - ### stringEntry

    StringEntryPREVIEW stringEntry (Utf8EntryPREVIEW utf8)
    Returns A `StringEntry`PREVIEW referencing the provided UTF8 entry. If a String entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `utf8` - the UTF8 entry describing the string
    Returns:
      A `StringEntry`PREVIEW referencing the provided UTF8 entry

  - ### stringEntry

    default StringEntryPREVIEW stringEntry (String value)
    Returns A `StringEntry`PREVIEW describing the provided value. If a string entry in the pool already describes this value, it is returned; otherwise, a new entry is added and the new entry is returned.
    Parameters:
      `value` - the value
    Returns:
      A `StringEntry`PREVIEW describing the provided value

  - ### constantValueEntry

    default ConstantValueEntryPREVIEW constantValueEntry (ConstantDesc c)
    Returns A `ConstantValueEntry`PREVIEW descripbing the provided Integer, Long, Float, Double, or String constant.
    Parameters:
      `c` - the constant
    Returns:
      A `ConstantValueEntry`PREVIEW descripbing the provided Integer, Long, Float, Double, or String constant

  - ### loadableConstantEntry

    default LoadableConstantEntryPREVIEW loadableConstantEntry (ConstantDesc c)
    Returns A `LoadableConstantEntry`PREVIEW describing the provided constant. The constant should be an Integer, String, Long, Float, Double, ClassDesc (for a Class constant), MethodTypeDesc (for a MethodType constant), DirectMethodHandleDesc (for a MethodHandle constant), or a DynamicConstantDesc (for a dynamic constant.)
    Parameters:
      `c` - the constant
    Returns:
      A `LoadableConstantEntry`PREVIEW describing the provided constant

  - ### annotationConstantValueEntry

    default AnnotationConstantValueEntryPREVIEW annotationConstantValueEntry (ConstantDesc c)
    Returns An `AnnotationConstantValueEntry`PREVIEW describing the provided constant. The constant should be an Integer, String, Long, Float, Double, ClassDesc (for a Class constant), or MethodTypeDesc (for a MethodType constant.)
    Parameters:
      `c` - the constant
    Returns:
      An `AnnotationConstantValueEntry`PREVIEW describing the provided constant

  - ### bsmEntry

    default BootstrapMethodEntryPREVIEW bsmEntry (DirectMethodHandleDesc methodReference, List<ConstantDesc> arguments)
    Returns a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments.
    Parameters:
      `methodReference` - the bootstrap method
      `arguments` - the bootstrap arguments
    Returns:
      a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments

  - ### bsmEntry

    BootstrapMethodEntryPREVIEW bsmEntry (MethodHandleEntryPREVIEW methodReference, List<LoadableConstantEntryPREVIEW> arguments)
    Returns a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments.
    Parameters:
      `methodReference` - the bootstrap method
      `arguments` - the bootstrap arguments
    Returns:
      a `BootstrapMethodEntry`PREVIEW describing the provided bootstrap method and static arguments