Last Updated: 3/4/97
Class NFDebug

Class NFDebug

public class NFDebug

This class is used to print out defug messages, based on the type of the message and the types currently enabled.

Note: All methods and variables are STATIC to make it easier to print debug messages from anywhere.

Instance Variables

Type Name Description Default
PrintStream printStream System.out
Label statusLabel null

Final Variables

Type Name Description
long ALL
long DWELL
long FILE
long JDBC
long LICENSE
long PARAM
long SERVER
long SYMBOL

Methods


static void clear (Vector v)
Clear all of the types defined in the given vector. The vector should contain Number objects, which will be converted to a long value to determine the bit setting.

static void clear (long type)
Disable the given type(s) for subsequent output. The type may be composed of OR'd type values to clear multiple types.

static void defineDebug (NFParam p,
                         String param)
Create a parser definition for a debug parameter.

static boolean enabled (long type)
Returns true if one or more of the types specified by the OR'd type parameter are currently set.

static void print (PrintStream ps,
                   String str)
Print the message on the given printStream.

static void print (String msg)
Print the message on the current printStream, without checking for type settings.

static void print (long type,
                   String msg)
Print the message on the current printStream, if the given type(s) is set.

static void set (Vector v)
Enable all of the types defined in the given vector. The vector should contain Number objects, which will be converted to a long value to determine the bit setting.
This method is generally used in conjunction with the defineDebug() method.

static void set (long type)
Enable the given type(s) for subsequent output. The type may be composed of OR'd type values to set multiple types at one time.

static void status (String str)
This method displays a message on the statusLabel, if defined.
Otherwise, the message is printed using the print() method.