java.lang.Object
com.sun.jdo.api.persistence.enhancer.classfile.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 Details

    • 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
    • addFieldRef

      public ConstFieldRef addFieldRef(String className, String fieldName, String type)
      Find or create a field constant in the pool
    • addMethodRef

      public ConstMethodRef addMethodRef(String className, String methodName, String type)
      Find or create a method constant in the pool
    • addInterfaceMethodRef

      public ConstInterfaceMethodRef addInterfaceMethodRef(String className, String methodName, String type)
      Find or create an interface method 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
    • addNameAndType

      public ConstNameAndType addNameAndType(String name, String type)
      Find or create a name/type 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?