*
* @param type type of the cast
* @return an InstructionList
*/
public Instruction cast(String type) {
ClassInfo ci = cp.addClassInfo(type);
short index = ci.getEntryIndex();
byte[] bytes = new byte[3];
bytes[0] = Opcodes.CHECKCAST;
bytes[1] = (byte) (index >> 8);
bytes[2] = (byte) (index & 255);