View Javadoc

1   // BasicDebugImpl.java, created Sat Feb 22 13:35:27 2003 by joewhaley
2   // Copyright (C) 2001-3 mcmartin
3   // Licensed under the terms of the GNU LGPL; see COPYING for details.
4   package joeq.Runtime;
5   
6   /***
7    * BasicDebugImpl
8    *
9    * @author Michael Martin <mcmartin@stanford.edu>
10   * @version $Id: BasicDebugImpl.java 1456 2004-03-09 22:01:46Z jwhaley $
11   */
12  public class BasicDebugImpl implements Debug.Delegate {
13  
14      public void write(byte[] msg, int size) {
15          for (int i=0; i<size; ++i)
16              System.err.print((char) msg[i]);
17      }
18  
19      public void write(String msg) {
20          System.err.print(msg);
21      }
22  
23      public void writeln(byte[] msg, int size) {
24          write(msg, size);
25          System.err.println();
26      }
27  
28      public void writeln(String msg) {
29          System.err.println(msg);
30      }
31  
32      public void die(int code) {
33          new InternalError().printStackTrace();
34          System.exit(code);
35      }
36  
37  }