package sophomore.classfile.bytecode;

import java.io.IOException;
import java.io.RandomAccessFile;

/**
 *
 * @author inagaki
 */
public class CpRefOpcode extends OpcodeInfo {
	int index;

	public CpRefOpcode(MnemonicTable opcodeType, int pc) {
		super(opcodeType, pc);
	}

	@Override
	public void read(RandomAccessFile raf) throws IOException {
		this.index = raf.readShort();
	}

	public int getIndexByte() {
		return index;
	}
}

@@ -340,16 +340,108 @@
 ption %7B%0A
+%09%09if(opcodeType == MnemonicTable.ldc) %7B%0A%09%09%09this.index = raf.readUnsignedByte();%0A%09%09%7D else %7B%0A%09
 %09%09this.i
@@ -464,16 +464,20 @@
 hort();%0A
+%09%09%7D%0A
 %09%7D%0A%0A%09pub

modify for ldc of opcode.