1 7 8 package org.gjt.jclasslib.bytecode; 9 10 import org.gjt.jclasslib.io.ByteCodeInput; 11 import org.gjt.jclasslib.io.ByteCodeOutput; 12 13 import java.io.IOException ; 14 15 21 public class MultianewarrayInstruction extends ImmediateShortInstruction { 22 23 private int dimensions; 24 25 29 public MultianewarrayInstruction(int opcode) { 30 super(opcode); 31 } 32 33 public int getSize() { 34 return super.getSize() + 1; 35 } 36 37 41 public int getDimensions() { 42 return dimensions; 43 } 44 45 49 public void setDimensions(int dimensions) { 50 this.dimensions = dimensions; 51 } 52 53 public void read(ByteCodeInput in) throws IOException { 54 super.read(in); 55 56 dimensions = in.readUnsignedByte(); 57 } 58 59 public void write(ByteCodeOutput out) throws IOException { 60 super.write(out); 61 62 out.writeByte(dimensions); 63 } 64 65 } 66 | Popular Tags |