00001 package gov.nasa.arc.ase.jpf.jvm.runtime;
00002
00003 import gov.nasa.arc.ase.jpf.*;
00004 import gov.nasa.arc.ase.jpf.jvm.*;
00005 import java.util.*;
00006 import gov.nasa.arc.ase.util.Debug;
00007
00008 public class Access {
00009
00010 private ThreadInfo thread;
00011 private List calls = new ArrayList();
00012
00013
00014 public Access(ThreadInfo thread) {
00015 this.thread = thread;
00016 }
00017 public void addCall(String className, String methodName,int linenr) {
00018 calls.add(new CallDescr(className,methodName,linenr));
00019 }
00020 public void addInit() {
00021 calls.add(new InitDescr());
00022 }
00023 public void addRead() {
00024 calls.add(new ReadDescr());
00025 }
00026 public void addWrite() {
00027 calls.add(new WriteDescr());
00028 }
00029 public ThreadInfo getThreadInfo() {
00030 return thread;
00031 }
00032 public void print() {
00033 Iterator calls_it = calls.iterator();
00034 String className = thread.getClassInfo().getClassName();
00035 Analyze.println("");
00036 Analyze.println("From " + className + " thread:");
00037 Analyze.println("--------------------------");
00038 while (calls_it.hasNext()) {
00039 ((DESCR)calls_it.next()).print();
00040 }
00041 }
00042 }