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