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 BInstanceOfInst extends AbstractInst 38 implements InstanceOfInst 39 { 40 41 42 protected Type checkType; 43 44 public BInstanceOfInst(Type opType) 45 { 46 if (!(opType instanceof RefType) && !(opType instanceof ArrayType)) 47 throw new RuntimeException ("invalid InstanceOfInst: "+ opType); 48 49 checkType = opType; 50 } 51 52 public int getInCount() 53 { 54 return 1; 55 } 56 57 public int getInMachineCount() 58 { 59 return 1; 60 } 61 62 public int getOutCount() 63 { 64 return 1; 65 } 66 67 public int getOutMachineCount() 68 { 69 return 1; 70 } 71 72 final public String getName() { return "instanceof"; } 73 74 public Type getCheckType() { return checkType; } 75 public void setCheckType(Type t) { checkType = t; } 76 77 public void apply(Switch sw) 78 { 79 ((InstSwitch) sw).caseInstanceOfInst(this); 80 } 81 82 83 public Object clone() 84 { 85 return new BInstanceOfInst(checkType); 86 } 87 88 } 89 90 | Popular Tags |