DynamicConstantPoolEntry (Java SE 23 & JDK 23)
Description: declaration: module: java.base, package: java.lang.classfile.constantpool, interface: DynamicConstantPoolEntry
Keywords: java.lang.classfile.constantpool.DynamicConstantPoolEntry interface

# Interface DynamicConstantPoolEntry

All Superinterfaces:
  `ClassFileElementPREVIEW`, `PoolEntryPREVIEW`, `WritableElementPREVIEW<PoolEntryPREVIEW>`

All Known Subinterfaces:
  `ConstantDynamicEntryPREVIEW`, `InvokeDynamicEntryPREVIEW`

public sealed interface DynamicConstantPoolEntry extends PoolEntryPREVIEW permits ConstantDynamicEntryPREVIEW, InvokeDynamicEntryPREVIEW
`DynamicConstantPoolEntry` is a preview API of the Java platform.
Programs can only use `DynamicConstantPoolEntry` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a dynamic constant pool entry, which is either `ConstantDynamicEntry`PREVIEW or `InvokeDynamicEntry`PREVIEW.

See Java Virtual Machine Specification:
  4.4.10 The CONSTANT_Dynamic_info and CONSTANT_InvokeDynamic_info Structures
Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `BootstrapMethodEntryPREVIEW`
  `bootstrap()`
  Returns the entry in the bootstrap method table for this constant.
  `int`
  `bootstrapMethodIndex()`
  Returns index of the entry in the bootstrap method table for this constant.
  `default Utf8EntryPREVIEW`
  `name()`
  Returns the invocation name.
  `NameAndTypeEntryPREVIEW`
  `nameAndType()`
  Returns the invocation name and type.
  `default Utf8EntryPREVIEW`
  `type()`
  Returns the invocation type.

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

  `constantPool, index, tag, width`

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

  `writeTo`

- ## Method Details

  - ### bootstrap

    BootstrapMethodEntryPREVIEW bootstrap()
    Returns the entry in the bootstrap method table for this constant.
    Returns:
      the entry in the bootstrap method table for this constant

  - ### bootstrapMethodIndex

    int bootstrapMethodIndex()
    Returns index of the entry in the bootstrap method table for this constant.
    Returns:
      index of the entry in the bootstrap method table for this constant

  - ### nameAndType

    NameAndTypeEntryPREVIEW nameAndType()
    Returns the invocation name and type.
    Returns:
      the invocation name and type

  - ### name

    default Utf8EntryPREVIEW name()
    Returns the invocation name.
    Returns:
      the invocation name

  - ### type

    default Utf8EntryPREVIEW type()
    Returns the invocation type.
    Returns:
      the invocation type