Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 19 20 25 26 27 28 29 30 package soot.jimple; 31 32 import soot.*; 33 import soot.util.*; 34 import java.util.*; 35 36 41 public class ParameterRef implements IdentityRef 42 { 43 int n; 44 Type paramType; 45 46 47 public ParameterRef(Type paramType, int number) 48 { 49 this.n = number; 50 this.paramType = paramType; 51 } 52 53 public boolean equivTo(Object o) 54 { 55 if (o instanceof ParameterRef) 56 { 57 return n == ((ParameterRef)o).n && 58 paramType.equals(((ParameterRef)o).paramType); 59 } 60 return false; 61 } 62 63 public int equivHashCode() 64 { 65 return n * 101 + paramType.hashCode() * 17; 66 } 67 68 69 public Object clone() 70 { 71 return new ParameterRef(paramType, n); 72 } 73 74 75 public String toString() 76 { 77 return "@parameter" + n + ": " + paramType; 78 } 79 80 public void toString( UnitPrinter up ) 81 { 82 up.identityRef(this); 83 } 84 85 86 public int getIndex() 87 { 88 return n; 89 } 90 91 92 public void setIndex(int index) 93 { 94 n = index; 95 } 96 97 public List getUseBoxes() 98 { 99 return AbstractUnit.emptyList; 100 } 101 102 103 public Type getType() 104 { 105 return paramType; 106 } 107 108 109 public void apply(Switch sw) 110 { 111 ((RefSwitch) sw).caseParameterRef(this); 112 } 113 } 114
| Popular Tags
|