The Disassembler Example Program (contd)
The ConstantPool class is implemented as an array of PoolEntry objects and :
- knows how to read the itself from a class file,
- can respond to requests for items in the constant pool.
PoolEntry objects hold items from one of the 11 different classes and types that can be stored in the constant pool.
ClassInfo objects hold a tag and an index into the constant pool for the name of the class.
RefInfo objects hold indices for the class and their NameAndType object in the constant pool. This is used for method references, field references and interface method references.
NameAndType objects hold indices into the constant pool for a name and a descriptor.