JNodeOS v1.1.5 API

edu.utah.janos.nodeos
Class pj_Debug

java.lang.Object
  |
  +--edu.utah.janos.nodeos.pj_Debug

public class pj_Debug
extends java.lang.Object

The package-internal debugging infrastructure. XXX Currently this is public for my convenience.

To avoid dependencies on classes that are not automagically loaded into all spaces, I have to jump through several hoops to make sure that non-critical classes are not used. (In particular, I have avoided the '"string" + String' syntax to avoid implicitly referencing java/lang/StringBuffer.

The majority of routines in this file deal with printing directly to stdout/stderr through VM facilities. See the corresponding native layer for the details on where that output is directed.

There are three basic facilities provided by this class, first the assert() methods which really aren't very useful without a pre-processor pass. Second, the primitive print functions and object print functions, because we all love printf-debugging. Third, the flag-based trace primitive for dynamically adjusting the printing of various parts of the Java system.

This class is not final. However the only subclass Debug is final.

Author:
Janos Ministry of Development
See Also:
Debug

Constructor Summary
pj_Debug()
           
 
Method Summary
static void beginDebugOutput()
           
static boolean checkLocked(java.lang.Object obj)
           
static void endDebugOutput()
           
static void exit()
          A direct exit.
static void print(java.lang.String str)
          A native print routine that doesn't require the basic Java classes.
static void printCharArray(char[] array, int start, int end)
          A native print routine that doesn't require the basic Java classes.
static void printInt(int i)
          A native print routine that doesn't require the basic Java classes.
static void printIntHex(int i)
          A native print routine that doesn't require the basic Java classes.
static void println(java.lang.String str)
          A native print routine that doesn't require the basic Java classes.
static void printStackTrace(java.lang.Throwable t)
          Print the stack trace of the given Throwable thread.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

pj_Debug

public pj_Debug()
Method Detail

println

public static void println(java.lang.String str)
A native print routine that doesn't require the basic Java classes. Prints a trailing newline.
Parameters:
str - The string to print

print

public static void print(java.lang.String str)
A native print routine that doesn't require the basic Java classes. Does not print a trailing newline.
Parameters:
str - The string to print

printInt

public static void printInt(int i)
A native print routine that doesn't require the basic Java classes. Prints the given integer as a string (in base 10).
Parameters:
i - the integer to print

printIntHex

public static void printIntHex(int i)
A native print routine that doesn't require the basic Java classes. Prints the given integer as a string (in hex).
Parameters:
i - the integer to print

printCharArray

public static void printCharArray(char[] array,
                                  int start,
                                  int end)
A native print routine that doesn't require the basic Java classes. Prints the given char array as a sequence of characters.
Parameters:
array - the char array to print
start - the first element of the char array to print
end - the last element of the char array to print

exit

public static void exit()
A direct exit. Do not pass Go; do not collect two hundred dollars. TODO: Rather dangerous to leave around.

printStackTrace

public static void printStackTrace(java.lang.Throwable t)
Print the stack trace of the given Throwable thread.

beginDebugOutput

public static void beginDebugOutput()

endDebugOutput

public static void endDebugOutput()

checkLocked

public static boolean checkLocked(java.lang.Object obj)

JNodeOS v1.1.5 API

This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/