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 InvokeInterfaceInstruction extends ImmediateShortInstruction { 22 23 private int count; 24 25 29 public InvokeInterfaceInstruction(int opcode) { 30 super(opcode); 31 } 32 33 39 public InvokeInterfaceInstruction(int opcode, int immediateShort, int count) { 40 super(opcode, immediateShort); 41 this.count = count; 42 } 43 44 45 public int getSize() { 46 return super.getSize() + 2; 47 } 48 49 53 public int getCount() { 54 return count; 55 } 56 57 61 public void setCount(int count) { 62 this.count = count; 63 } 64 65 public void read(ByteCodeInput in) throws IOException { 66 super.read(in); 67 68 count = in.readUnsignedByte(); 69 in.readByte(); 71 } 72 73 public void write(ByteCodeOutput out) throws IOException { 74 super.write(out); 75 76 out.writeByte(count); 77 out.writeByte(0); 78 } 79 80 } 81 | Popular Tags |