00001 package gov.nasa.arc.ase.jpf.jvm.runtime;
00002
00003 import gov.nasa.arc.ase.jpf.*;
00004 import java.util.*;
00005 import gov.nasa.arc.ase.util.Debug;
00006
00007
00008 public class DependInfo{
00009
00010 Unit creatingThread;
00011 eHashSet reads = new eHashSet();
00012 eHashSet writes = new eHashSet();
00013
00014
00015 public DependInfo(){}
00016 public DependInfo(Unit creatingThread){
00017 this.creatingThread = creatingThread;
00018 }
00019 public void addRead(Unit obj){
00020 reads.add(obj);
00021 }
00022 public void addWrite(Unit obj){
00023 writes.add(obj);
00024 }
00025 public eHashSet getReads(){
00026 return reads;
00027 }
00028 public Unit getThread(){
00029 return creatingThread;
00030 }
00031 public eHashSet getWrites(){
00032 return writes;
00033 }
00034 public void print(){
00035 Debug.print(Debug.ERROR, "CREATER: ");
00036 if (creatingThread != null)
00037 creatingThread.print();
00038 else
00039 Debug.print(Debug.ERROR, "* System");
00040 Debug.println(Debug.ERROR, "");
00041 Debug.print(Debug.ERROR, "READS : ");
00042 reads.print();
00043 Debug.println(Debug.ERROR, "");
00044 Debug.print(Debug.ERROR, "WRITES : ");
00045 writes.print();
00046 Debug.println(Debug.ERROR, "");
00047 }
00048 }