home *** CD-ROM | disk | FTP | other *** search
/ PC Online 1998 January / PCO0198.ISO / browser / net_linx / java40.jar / netscape / debug / StackFrameInfo.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-11-03  |  887 b   |  35 lines

  1. package netscape.debug;
  2.  
  3. public abstract class StackFrameInfo {
  4.    ThreadState threadState;
  5.    StackFrameInfo caller;
  6.  
  7.    protected StackFrameInfo(ThreadState var1) {
  8.       this.threadState = var1;
  9.    }
  10.  
  11.    public boolean isValid() {
  12.       return this.threadState.isValid();
  13.    }
  14.  
  15.    public synchronized StackFrameInfo getCaller() throws InvalidInfoException {
  16.       if (this.caller == null) {
  17.          this.caller = this.getCaller0();
  18.       }
  19.  
  20.       if (!this.isValid()) {
  21.          throw new InvalidInfoException("invalid StackFrameInfo");
  22.       } else {
  23.          return this.caller;
  24.       }
  25.    }
  26.  
  27.    protected abstract StackFrameInfo getCaller0() throws InvalidInfoException;
  28.  
  29.    public Thread getThread() {
  30.       return this.threadState.getThread();
  31.    }
  32.  
  33.    public abstract PC getPC() throws InvalidInfoException;
  34. }
  35.