Class ConstantPool

java.lang.Object
de.inetsoftware.classparser.ConstantPool

public class ConstantPool extends Object
  • Field Details

  • Constructor Details

    • ConstantPool

      ConstantPool(DataInputStream input) throws IOException
      https://docs.oracle.com/javase/specs/jvms/se9/html/jvms-4.html#jvms-4.4
      Parameters:
      input - the stream of the class
      Throws:
      IOException - if any IO error occur
  • Method Details

    • get

      public Object get(int index)
      Get a object from the pool at the given index.
      Parameters:
      index - the index
      Returns:
      the object
    • set

      void set(int index, Object value)
      Set a value in the constant pool.
      Parameters:
      index - the index
      value - the new value
    • size

      int size()
      Get the count of entries in the pool.
      Returns:
      the count