jconst
Class constPool

java.lang.Object
  |
  +--util.dataRead
        |
        +--jconst.constPool

public class constPool
extends dataRead
implements constPoolTags


Field Summary
private  constBase[] constPool
           
private  int constPoolCnt
           
 
Fields inherited from class util.dataRead
bytesRead
 
Fields inherited from interface jconst.constPoolTags
CONSTANT_Class, CONSTANT_Double, CONSTANT_Fieldref, CONSTANT_Float, CONSTANT_Integer, CONSTANT_InterfaceMethodref, CONSTANT_Long, CONSTANT_Methodref, CONSTANT_NameAndType, CONSTANT_String, CONSTANT_Utf8
 
Constructor Summary
constPool(java.io.DataInputStream dStream)
           
 
Method Summary
private  constBase allocConstEntry(int tag)
           
 constBase constPoolElem(int ix)
           
 void pr()
           
private  void readConstPool(java.io.DataInputStream dStream)
          Read the JVM class file constant pool and put it in the internal constant pool.
private  void resolveConstPool()
           
 
Methods inherited from class util.dataRead
getBytesRead, readU1, readU2, readU4
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

constPoolCnt

private int constPoolCnt

constPool

private constBase[] constPool
Constructor Detail

constPool

public constPool(java.io.DataInputStream dStream)
Method Detail

constPoolElem

public constBase constPoolElem(int ix)

allocConstEntry

private constBase allocConstEntry(int tag)

resolveConstPool

private void resolveConstPool()

readConstPool

private void readConstPool(java.io.DataInputStream dStream)
Read the JVM class file constant pool and put it in the internal constant pool.

There is a special case in constant pool construction. CONSTANT_Long_info and CONSTANT_Double_info structures take up tow elements in the constant pool table (constPool). See JVM Spec. 4.4.5. As noted in a footnote "In retrospect, making 8-byte constants take two constant pool entries was a poor choice." The extra constant pool entry is unused (and is set to null here).


pr

public void pr()