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 LockAccess{
00009
00010 private ThreadInfo thread;
00011 private List calls = new ArrayList();
00012
00013
00014 public LockAccess(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 ThreadInfo getThreadInfo(){
00021 return thread;
00022 }
00023 public void print(){
00024 Iterator calls_it = calls.iterator();
00025 String className = thread.getClassInfo().getClassName();
00026 LockOrder.println("");
00027 LockOrder.println("by " + className + " thread:");
00028 LockOrder.println("------------------");
00029 while (calls_it.hasNext()){
00030 ((DESCR)calls_it.next()).print();
00031 }
00032 }
00033 }