1 19 20 25 26 27 28 29 30 31 package soot.jimple.internal; 32 33 import soot.tagkit.*; 34 import soot.*; 35 import soot.jimple.*; 36 import soot.baf.*; 37 import soot.jimple.*; 38 import soot.util.*; 39 import java.util.*; 40 41 public class JInstanceOfExpr extends AbstractInstanceOfExpr 42 implements ConvertToBaf 43 { 44 public JInstanceOfExpr(Value op, Type checkType) 45 { 46 super(Jimple.v().newImmediateBox(op), checkType); 47 } 48 49 50 public void convertToBaf(JimpleToBafContext context, List out) 51 { 52 ((ConvertToBaf)(getOp())).convertToBaf(context, out); 53 Unit u; 54 out.add(u = Baf.v().newInstanceOfInst(getCheckType())); 55 56 Unit currentUnit = context.getCurrentUnit(); 57 58 Iterator it = currentUnit.getTags().iterator(); 59 while(it.hasNext()) { 60 u.addTag((Tag) it.next()); 61 } 62 } 63 64 65 66 public Object clone() 67 { 68 return new JInstanceOfExpr(Jimple.cloneIfNecessary(getOp()), checkType); 69 } 70 71 } 72 | Popular Tags |