1 19 20 25 26 27 28 29 30 package soot.baf.internal; 31 32 import soot.*; 33 import soot.baf.*; 34 import soot.util.*; 35 import java.util.*; 36 37 public class BInstanceCastInst extends AbstractInst 38 implements InstanceCastInst 39 { 40 41 protected Type castType; 42 43 public BInstanceCastInst(Type opType) 44 { 45 46 if (!(opType instanceof RefType) && !(opType instanceof ArrayType)) 47 throw new RuntimeException ("invalid InstanceCastInst: "+ opType); 48 castType = opType; 49 } 50 51 52 public int getInCount() 53 { 54 return 1; 55 } 56 57 58 59 60 61 public Object clone() 62 { 63 64 return new BInstanceCastInst(castType); 65 66 } 67 68 69 public int getInMachineCount() 70 { 71 return 1; 72 } 73 74 public int getOutCount() 75 { 76 return 1; 77 } 78 79 public int getOutMachineCount() 80 { 81 return 1; 82 } 83 84 85 final public String getName() { return "checkcast"; } 86 87 public Type getCastType() { return castType; } 88 public void setCastType(Type t) { castType = t; } 89 90 public void apply(Switch sw) 91 { 92 ((InstSwitch) sw).caseInstanceCastInst(this); 93 } 94 } 95 96 | Popular Tags |