1 19 20 25 26 27 package soot.baf.internal; 28 29 import soot.*; 30 import soot.util.*; 31 import java.util.*; 32 33 public class BafLocal implements Local 34 { 35 String name; 36 Type type; 37 38 int fixedHashCode; 39 boolean isHashCodeChosen; 40 41 public BafLocal(String name, Type t) 42 { 43 this.name = name; 44 this.type = t; 45 } 46 47 48 public boolean equivTo(Object o) 49 { 50 return this.equals( o ); 51 } 52 53 54 public int equivHashCode() 55 { 56 return name.hashCode() * 101 + type.hashCode() * 17; 57 } 58 59 public Object clone() 60 { 61 return new BafLocal(name, type); 62 } 63 64 public String getName() 65 { 66 return name; 67 } 68 69 public void setName(String name) 70 { 71 this.name = name; 72 } 73 74 public Type getType() 75 { 76 return type; 77 } 78 79 public void setType(Type t) 80 { 81 this.type = t; 82 } 83 84 public String toString() 85 { 86 return getName(); 87 } 88 89 public void toString( UnitPrinter up ) { 90 up.local( this ); 91 } 92 93 public List getUseBoxes() 94 { 95 return AbstractUnit.emptyList; 96 } 97 98 public void apply(Switch s) 99 { 100 throw new RuntimeException ("invalid case switch"); 101 } 102 public final int getNumber() { return number; } 103 public final void setNumber( int number ) { this.number = number; } 104 105 private int number = 0; 106 } 107 | Popular Tags |