1 19 20 25 26 27 28 29 30 package soot.jimple; 31 32 import soot.tagkit.*; 33 import soot.baf.*; 34 import soot.*; 35 import soot.util.*; 36 import java.util.*; 37 38 public abstract class Constant implements Value, ConvertToBaf, Immediate 39 { 40 public List getUseBoxes() 41 { 42 return AbstractUnit.emptyList; 43 } 44 45 46 public void convertToBaf(JimpleToBafContext context, List out) 47 { 48 Unit u = Baf.v().newPushInst(this); 49 out.add(u); 50 51 Iterator it = context.getCurrentUnit().getTags().iterator(); 52 53 while(it.hasNext()) 54 { 55 u.addTag((Tag) it.next()); 56 } 57 } 58 59 60 public Object clone() 61 { 62 throw new RuntimeException (); 63 } 64 65 67 public boolean equivTo(Object c) 68 { 69 return equals(c); 70 } 71 72 74 public int equivHashCode() 75 { 76 return hashCode(); 77 } 78 79 public void toString( UnitPrinter up ) { 80 up.constant(this); 81 } 82 } 83 | Popular Tags |