1 19 20 25 26 27 package soot.jimple; 28 29 import soot.*; 30 import soot.util.*; 31 import java.util.*; 32 33 public class ThisRef implements IdentityRef 34 { 35 RefType thisType; 36 37 public ThisRef(RefType thisType) 38 { 39 this.thisType = thisType; 40 } 41 42 public boolean equivTo(Object o) 43 { 44 if (o instanceof ThisRef) 45 { 46 return thisType.equals(((ThisRef)o).thisType); 47 } 48 return false; 49 } 50 51 public int equivHashCode() 52 { 53 return thisType.hashCode(); 54 } 55 56 public String toString() 57 { 58 return "@this: "+thisType; 59 } 60 61 public void toString( UnitPrinter up ) { 62 up.identityRef(this); 63 } 64 65 public List getUseBoxes() 66 { 67 return AbstractUnit.emptyList; 68 } 69 70 public Type getType() 71 { 72 return thisType; 73 } 74 75 public void apply(Switch sw) 76 { 77 ((RefSwitch) sw).caseThisRef(this); 78 } 79 80 public Object clone() 81 { 82 return new ThisRef(thisType); 83 } 84 85 } 86 | Popular Tags |