1 19 20 25 26 package soot.tagkit; 27 28 34 35 public class BytecodeOffsetTag implements Tag { 36 38 private int offset; 39 40 42 public BytecodeOffsetTag(int offset) { 43 this.offset = offset; 44 } 45 46 48 public String getName() { 49 return "BytecodeOffsetTag"; 50 } 51 52 54 public byte [] getValue() { 55 byte [] v = new byte[4]; 56 v[0] = (byte) ((offset >> 24) % 256);; 57 v[1] = (byte) ((offset >> 16) % 256);; 58 v[2] = (byte) ((offset >> 8) % 256);; 59 v[3] = (byte) (offset % 256); 60 return v; 61 } 62 63 65 public int getBytecodeOffset() { 66 return offset; 67 } 68 69 71 public String toString() { 72 return "" + offset; 73 } 74 } 75 | Popular Tags |