1 20 21 package soot.dava.internal.javaRep; 22 23 import soot.*; 24 import java.util.*; 25 import soot.grimp.internal.*; 26 27 public class DInstanceFieldRef extends GInstanceFieldRef 28 { 29 private HashSet thisLocals; 30 31 public DInstanceFieldRef( Value base, SootFieldRef fieldRef, HashSet thisLocals) 32 { 33 super( base, fieldRef); 34 35 this.thisLocals = thisLocals; 36 } 37 38 public void toString( UnitPrinter up ) { 39 if( thisLocals.contains(getBase()) ) { 40 up.fieldRef( fieldRef ); 41 } else { 42 super.toString( up ); 43 } 44 } 45 46 public String toString() 47 { 48 if (thisLocals.contains( getBase())) 49 return fieldRef.name(); 50 51 return super.toString(); 52 } 53 54 public Object clone() 55 { 56 return new DInstanceFieldRef( getBase(), fieldRef, thisLocals); 57 } 58 } 59 | Popular Tags |