package sds.classfile.bytecode;

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

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

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

	@Override
	public void read(ClassFileStream data) throws IOException {
		super.read(data);
		this.dimensions = data.readByte();
	}

	/**
	 * return value of dimensions of the array.
	 * @return value of dimensions of the array
	 */
	public int getDimensions() {
		return dimensions;
	}

	@Override
	public String toString() {
		return super.toString() + ", " + dimensions;
	}
}
@@ -91,16 +91,51 @@
 eStream;
+%0Aimport sds.classfile.ConstantPool;
 %0A%0A/**%0A *
@@ -576,16 +576,35 @@
 eam data
+, ConstantPool pool
 ) throws
@@ -635,16 +635,22 @@
 ead(data
+, pool
 );%0A%09%09thi

modify to invoke wrong method.