1 19 20 25 26 27 package soot.jimple.internal; 28 29 import soot.*; 30 import soot.jimple.*; 31 import soot.util.*; 32 import java.util.*; 33 34 public abstract class AbstractNewExpr implements NewExpr 35 { 36 RefType type; 37 38 public boolean equivTo(Object o) 39 { 40 if (o instanceof AbstractNewExpr) 41 { 42 AbstractNewExpr ae = (AbstractNewExpr)o; 43 return type.equals(ae.type); 44 } 45 return false; 46 } 47 48 49 public int equivHashCode() 50 { 51 return type.hashCode(); 52 } 53 54 public abstract Object clone(); 55 56 public String toString() 57 { 58 return Jimple.v().NEW + " " + type.toString(); 59 } 60 61 public void toString( UnitPrinter up ) 62 { 63 up.literal(Jimple.v().NEW); 64 up.literal(" "); 65 up.type(type); 66 } 67 68 public RefType getBaseType() 69 { 70 return type; 71 } 72 73 public void setBaseType(RefType type) 74 { 75 this.type = type; 76 } 77 78 public Type getType() 79 { 80 return type; 81 } 82 83 84 public List getUseBoxes() 85 { 86 return AbstractUnit.emptyList; 87 } 88 89 public void apply(Switch sw) 90 { 91 ((ExprSwitch) sw).caseNewExpr(this); 92 } 93 } 94 | Popular Tags |