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 ImmediateIntInstruction extends AbstractInstruction { 22 23 private int immediateInt; 24 25 29 public ImmediateIntInstruction(int opcode) { 30 super(opcode); 31 } 32 33 38 public ImmediateIntInstruction(int opcode, int immediateInt) { 39 super(opcode); 40 this.immediateInt = immediateInt; 41 } 42 43 public int getSize() { 44 return super.getSize() + 4; 45 } 46 47 51 public int getImmediateInt() { 52 return immediateInt; 53 } 54 55 59 public void setImmediateInt(int immediateInt) { 60 this.immediateInt = immediateInt; 61 } 62 63 public void read(ByteCodeInput in) throws IOException { 64 super.read(in); 65 66 immediateInt = in.readInt(); 67 } 68 69 public void write(ByteCodeOutput out) throws IOException { 70 super.write(out); 71 72 out.writeInt(immediateInt); 73 } 74 75 } 76 | Popular Tags |