Package Summary Overview Summary

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

# Interface LoadableConstantEntry

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

All Known Subinterfaces:
  `ClassEntryPREVIEW`, `ConstantDynamicEntryPREVIEW`, `ConstantValueEntryPREVIEW`, `DoubleEntryPREVIEW`, `FloatEntryPREVIEW`, `IntegerEntryPREVIEW`, `LongEntryPREVIEW`, `MethodHandleEntryPREVIEW`, `MethodTypeEntryPREVIEW`, `StringEntryPREVIEW`

public sealed interface LoadableConstantEntry extends PoolEntryPREVIEW permits ClassEntryPREVIEW, ConstantDynamicEntryPREVIEW, ConstantValueEntryPREVIEW, MethodHandleEntryPREVIEW, MethodTypeEntryPREVIEW
`LoadableConstantEntry` is a preview API of the Java platform.
Programs can only use `LoadableConstantEntry` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Marker interface for constant pool entries suitable for loading via the `LDC` instructions.

Sealed Class Hierarchy Graph:
Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ConstantDesc`
  `constantValue()`
  Returns the constant described by this entry.
  `default TypeKindPREVIEW`
  `typeKind()`
  Returns the type of the constant.

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

  `constantPool, index, tag, width`

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

  `writeTo`

- ## Method Details

  - ### constantValue

    ConstantDesc constantValue()
    Returns the constant described by this entry.
    Returns:
      the constant described by this entry

  - ### typeKind

    default TypeKindPREVIEW typeKind()
    Returns the type of the constant.
    Returns:
      the type of the constant