gov.nih.nlm.nls.utils
Class StaticDebug

java.lang.Object
  extended bygov.nih.nlm.nls.utils.StaticDebug
Direct Known Subclasses:
Debug

public class StaticDebug
extends java.lang.Object


Constructor Summary
StaticDebug()
           
 
Method Summary
static void denter(int traceCode)
          Method denter tags the method with a flag number.
static void dexit(int traceCode)
          dexit is a method that is found at the end of each method, and is married to the denter method.
static void dfname(java.lang.String methodName)
          Method dfname adds a method or constructor name to the stack of method names.
static boolean dIsSet(int flag)
          dIsSet returns true if the flag is set
static void dpr(int flag, java.lang.String message)
          dprint and dpr are methods to send messages to intended to be debugging messages.
static void dprint(int flag, java.lang.String message)
          dprint and dpr are methods to send messages to intended to be debugging messages.
static void main(java.lang.String[] argv)
          This is a test main, whose purpose is to test the functionality of each method developed for this class.
static void setFlag(int pFlag, boolean pValue)
          set sets the flag to pValue.
static void warning(java.lang.String message)
          warning is a convient way to send a debugging message, regardless whether the flag is set or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StaticDebug

public StaticDebug()
Method Detail

dfname

public static void dfname(java.lang.String methodName)
Method dfname adds a method or constructor name to the stack of method names. dfname appears at the top of every method and constructor.

Parameters:
methodName - The name of the method or constructor.

denter

public static void denter(int traceCode)
Method denter tags the method with a flag number. Flag numbers are automaticly created by a stubbing program skel. Flag numbers are created as private final static int's (constants in other languages) The flags passed in to denter are those which can be specified in the debug.fla file to be turned on and off. When a flag is turned on, as the application passes through this code, a pretty printed print statement will be printed for this method.

Parameters:
traceCode - A flag specified when the method is stubbed.

dprint

public static void dprint(int flag,
                          java.lang.String message)
dprint and dpr are methods to send messages to intended to be debugging messages. dpr and dprint take a flag and a message as parameters. At runtime, if the flag has been set, a pretty printed message will print out as the code passes this statement. If the flag is not set or is set off, then no message is printed.

Parameters:
flag -
message -

dpr

public static void dpr(int flag,
                       java.lang.String message)
dprint and dpr are methods to send messages to intended to be debugging messages. dpr and dprint take a flag and a message as parameters. At runtime, if the flag has been set, a pretty printed message will print out as the code passes this statement. If the flag is not set or is set off, then no message is printed.

Parameters:
flag -
message -

dIsSet

public static boolean dIsSet(int flag)
dIsSet returns true if the flag is set

Parameters:
flag -
Returns:
boolean message

setFlag

public static void setFlag(int pFlag,
                           boolean pValue)
set sets the flag to pValue. This is useful for debugging where you cannot get debug a file of flags. This happens in jsp programming.

Parameters:
pFlag -
pValue -

warning

public static void warning(java.lang.String message)
warning is a convient way to send a debugging message, regardless whether the flag is set or not. warning is useful to be embedded in the exception sections, where one should always report some useful message.

Parameters:
message -

dexit

public static void dexit(int traceCode)
dexit is a method that is found at the end of each method, and is married to the denter method. denter and dexit methods determine the level of indentation when pretty printing. The dexit method unindents what the denter method indents.

Parameters:
traceCode -

main

public static final void main(java.lang.String[] argv)
This is a test main, whose purpose is to test the functionality of each method developed for this class. This main strives to test the boundary conditions as well as some sample common ways each public method is intended to be used.

Parameters:
argv - The command line input, tokenized


The use and distribution of this material is subject to the terms and conditions included in the file SPECIALIST_NLP_TOOLS_TERMS_AND_CONDITIONS.TXT, located in the root directory of the distribution.