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 AbstractLengthExpr extends AbstractUnopExpr implements LengthExpr 35 { 36 protected AbstractLengthExpr(ValueBox opBox) { super(opBox); } 37 38 public boolean equivTo(Object o) 39 { 40 if (o instanceof AbstractLengthExpr) 41 { 42 return opBox.getValue().equivTo(((AbstractLengthExpr)o).opBox.getValue()); 43 } 44 return false; 45 } 46 47 48 public int equivHashCode() 49 { 50 return opBox.getValue().equivHashCode(); 51 } 52 53 public abstract Object clone(); 54 55 public String toString() 56 { 57 return Jimple.LENGTHOF + " " + opBox.getValue().toString(); 58 } 59 60 public void toString(UnitPrinter up) { 61 up.literal(Jimple.LENGTHOF); 62 up.literal(" "); 63 opBox.toString(up); 64 } 65 66 public Type getType() 67 { 68 return IntType.v(); 69 } 70 71 public void apply(Switch sw) 72 { 73 ((ExprSwitch) sw).caseLengthExpr(this); 74 } 75 } 76 | Popular Tags |