ojvm.loading
Class ConstantPool

java.lang.Object
  |
  +--ojvm.loading.ConstantPool

public class ConstantPool
extends java.lang.Object

The constant pool ... It is originally created by reading a classFile. The constructor reads the information and then checks that indices point to the right places For example a constant_class_info index should point to an entry that has a name_index which itself points to a UTF8 structure, etc. We must do it in two passes.


Method Summary
 CPEntry get(int index)
           
 CPClassEntry getClassEntry(int index)
           
 CPDoubleEntry getDoubleEntry(int index)
           
 CPFieldEntry getFieldEntry(int index)
           
 CPFloatEntry getFloatEntry(int index)
           
 CPIntEntry getIntEntry(int index)
           
 CPInterfaceMethodEntry getInterfaceMethodEntry(int index)
           
 CPLongEntry getLongEntry(int index)
           
 CPMethodEntry getMethodEntry(int index)
           
 ojvm.loading.CPNameAndTypeEntry getNameAndTypeEntry(int index)
           
 CPStringEntry getStringEntry(int index)
           
 ojvm.loading.CPUtf8Entry getUtf8Entry(int index)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

getClassEntry

public CPClassEntry getClassEntry(int index)
                           throws ConstantPoolE

getFieldEntry

public CPFieldEntry getFieldEntry(int index)
                           throws ConstantPoolE

getMethodEntry

public CPMethodEntry getMethodEntry(int index)
                             throws ConstantPoolE

getInterfaceMethodEntry

public CPInterfaceMethodEntry getInterfaceMethodEntry(int index)
                                               throws ConstantPoolE

getStringEntry

public CPStringEntry getStringEntry(int index)
                             throws ConstantPoolE

getIntEntry

public CPIntEntry getIntEntry(int index)
                       throws ConstantPoolE

getFloatEntry

public CPFloatEntry getFloatEntry(int index)
                           throws ConstantPoolE

getLongEntry

public CPLongEntry getLongEntry(int index)
                         throws ConstantPoolE

getDoubleEntry

public CPDoubleEntry getDoubleEntry(int index)
                             throws ConstantPoolE

getNameAndTypeEntry

public ojvm.loading.CPNameAndTypeEntry getNameAndTypeEntry(int index)
                                                    throws ConstantPoolE

getUtf8Entry

public ojvm.loading.CPUtf8Entry getUtf8Entry(int index)
                                      throws ConstantPoolE

get

public CPEntry get(int index)
            throws ConstantPoolE

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object