package sophomore.classfile.bytecode;

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

import sophomore.classfile.Info;

/**
 * This class for opcode that has no operand.
 * @author inagaki
 */
public class OpcodeInfo implements Info {
	/**
	 * 
	 */
	MnemonicTable opcodeType;
	/**
	 * 
	 */
	int pc;

	OpcodeInfo(MnemonicTable opcodeType, int pc) {
		this.opcodeType = opcodeType;
		this.pc = pc;
	}

	@Override
	public void read(RandomAccessFile raf) throws IOException {}

	public MnemonicTable getOpcodeType() {
		return opcodeType;
	}

	public int getPc() {
		return pc;
	}
}
@@ -586,10 +586,85 @@
 n pc;%0A%09%7D
+%0A%0A%09@Override%0A%09public String toString() %7B%0A%09%09return opcodeType.toString();%0A%09%7D
 %0A%7D

implement 'toString' method.