Interface ConstantPool

All Known Subinterfaces:
ClassReader, ConstantPoolBuilder
All Known Implementing Classes:
ClassReaderImpl, SplitConstantPool, TemporaryConstantPool

public sealed interface ConstantPool permits ClassReader, ConstantPoolBuilder
Provides read access to the constant pool and bootstrap method table of a classfile.
  • Method Details

    • entryByIndex

      PoolEntry entryByIndex(int index)
      Returns the entry at the specified index.
      Parameters:
      index - the index within the pool of the desired entry
      Returns:
      the entry at the specified index
    • entryCount

      int entryCount()
      Returns the number of entries in the constant pool.
      Returns:
      the number of entries in the constant pool
    • bootstrapMethodEntry

      BootstrapMethodEntry bootstrapMethodEntry(int index)
      Returns the BootstrapMethodEntry at the specified index within the bootstrap method table.
      Parameters:
      index - the index within the bootstrap method table of the desired entry
      Returns:
      the BootstrapMethodEntry at the specified index within the bootstrap method table
    • bootstrapMethodCount

      int bootstrapMethodCount()
      Returns the number of entries in the bootstrap method table.
      Returns:
      the number of entries in the bootstrap method table