1 package Analysis.TaskStateAnalysis;
2 import IR.MethodDescriptor;
3 import IR.TagDescriptor;
5 import java.util.HashSet;
8 public class TagBinding extends GraphNode {
9 private MethodDescriptor md;
10 private TagDescriptor[] tdarray;
11 private HashSet allocations;
13 public TagBinding(MethodDescriptor md) {
15 tdarray=new TagDescriptor[md.numParameters()];
16 allocations=new HashSet();
19 public String toString() {
20 String st=md.toString();
21 for(int i=0;i<tdarray.length;i++)
26 public Set getAllocations() {
30 public void setBinding(int i, TagDescriptor td) {
34 public MethodDescriptor getMethod() {
38 public TagDescriptor getBinding(int i) {
42 public boolean equals(Object o) {
43 if (o instanceof TagBinding) {
44 TagBinding tb=(TagBinding)o;
47 for(int i=0;i<tdarray.length;i++)
48 if (tdarray[i]!=null) {
49 if (!tdarray[i].equals(tb.tdarray[i]))
51 } else if(tb.tdarray[i]!=null)
58 public int hashCode() {
59 int hashcode=md.hashCode();
60 for(int i=0;i<tdarray.length;i++) {
62 hashcode^=tdarray[i].hashCode();