Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

LockAccess.java

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 // ifdef RACE
00010   private ThreadInfo thread;
00011   private List calls = new ArrayList(); // List of DESCR's
00012 
00013 //#endif RACE
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 }

Generated at Thu Feb 7 06:49:54 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001