Class ConstantPool

  • All Implemented Interfaces:
    VMConstants

    public class ConstantPool
    extends Object
    implements VMConstants
    Constant Pool implementation - this represents the constant pool of a class in a class file.
    • Method Detail

      • nEntries

        public int nEntries()
        Return the number of pool entries.
      • constantAt

        public ConstBasic constantAt​(int index)
        Return the constant in the pool at the specified entry index
      • addClass

        public ConstClass addClass​(String className)
        Find or create a class constant in the pool
      • addString

        public ConstString addString​(String s)
        Find or create a string constant in the pool
      • addInteger

        public ConstInteger addInteger​(int i)
        Find or create an integer constant in the pool
      • addFloat

        public ConstFloat addFloat​(float f)
        Find or create a float constant in the pool
      • addLong

        public ConstLong addLong​(long l)
        Find or create a long constant in the pool
      • addDouble

        public ConstDouble addDouble​(double d)
        Find or create a double constant in the pool
      • addUtf8

        public ConstUtf8 addUtf8​(String s)
        Find or create a utf8 constant in the pool
      • addUnicode

        public ConstUnicode addUnicode​(String s)
        Find or create a unicode constant in the pool Obsolete?