package sds.classfile.bytecode;

import java.io.IOException;
import sds.classfile.ClassFileStream;
import sds.classfile.ConstantPool;

/**
 * This class is for
 * <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-6.html#jvms-6.5.invokeinterface">
 * invokeinterface
 * </a>.
 * @author inagaki
 */
public class InvokeInterface extends CpRefOpcode {
	private int count;

	/**
	 * constructor.
	 * @param pc index into the code array
	 */
	public InvokeInterface(int pc) {
		super(MnemonicTable.invokeinterface, pc);
	}

	@Override
	public void read(ClassFileStream data, ConstantPool pool) throws IOException {
		super.read(data);
		this.count = data.readUnsignedByte();
	}

	/**
	 * returns count.
	 * @return count
	 */
	public int getCount() {
		return count;
	}

	@Override
	public String toString() {
		return super.toString() + ", " + count;
	}
}
@@ -635,16 +635,22 @@
 ead(data
+, pool
 );%0A%09%09thi
@@ -684,16 +684,37 @@
 Byte();%0A
+%09%09data.skipBytes(1);%0A
 %09%7D%0A%0A%09/**

modify bug which don't finish to read.