Interface PoolEntry

All Known Subinterfaces:
AnnotationConstantValueEntryPREVIEW, ClassEntryPREVIEW, ConstantDynamicEntryPREVIEW, ConstantValueEntryPREVIEW, DoubleEntryPREVIEW, DynamicConstantPoolEntryPREVIEW, FieldRefEntryPREVIEW, FloatEntryPREVIEW, IntegerEntryPREVIEW, InterfaceMethodRefEntryPREVIEW, InvokeDynamicEntryPREVIEW, LoadableConstantEntryPREVIEW, LongEntryPREVIEW, MemberRefEntryPREVIEW, MethodHandleEntryPREVIEW, MethodRefEntryPREVIEW, MethodTypeEntryPREVIEW, ModuleEntryPREVIEW, NameAndTypeEntryPREVIEW, PackageEntryPREVIEW, StringEntryPREVIEW, Utf8EntryPREVIEW

PoolEntry is a preview API of the Java platform.
Programs can only use PoolEntry when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models an entry in the constant pool of a classfile.
Sealed Class Hierarchy Graph:
Sealed class hierarchy graph for PoolEntrySealed class hierarchy graph for PoolEntry
Since:
22
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the constant pool this entry is from.
    int
    Returns the index within the constant pool corresponding to this entry.
    byte
    tag()
    Returns the constant pool tag that describes the type of this entry.
    int
    Returns the number of constant pool slots this entry consumes.
  • Method Details

    • constantPool

      ConstantPoolPREVIEW constantPool()
      Returns the constant pool this entry is from.
      Returns:
      the constant pool this entry is from
    • tag

      byte tag()
      Returns the constant pool tag that describes the type of this entry.
      Returns:
      the constant pool tag that describes the type of this entry
    • index

      int index()
      Returns the index within the constant pool corresponding to this entry.
      Returns:
      the index within the constant pool corresponding to this entry
    • width

      int width()
      Returns the number of constant pool slots this entry consumes.
      Returns:
      the number of constant pool slots this entry consumes