Create a constant pool.
// CheckStyle:VisibilityModifier ON
super();
int count = data.readUnsignedShort();
types = new byte [ count ];
values = new Object [ count ];
// read in all constant pool entries.
for (int i = 1; i < count; i++) {
byte type = data.readByte();
types[i] = type;
switch (type) {
case UTF8 :
values[i] = data.readUTF();
break;
case UNUSED :
break;
case INTEGER :
values[i] = new Integer(data.readInt());
break;
case FLOAT :
values[i] = new Float(data.readFloat());
break;
case LONG :
values[i] = new Long(data.readLong());
++i;
break;
case DOUBLE :
values[i] = new Double(data.readDouble());
++i;
break;
case CLASS :
case STRING :
values[i] = new Integer(data.readUnsignedShort());
break;
case FIELDREF :
case METHODREF :
case INTERFACEMETHODREF :
case NAMEANDTYPE :
values[i] = new Integer(data.readInt());
break;
default:
// Do nothing
}
}