Parsing Engine

danbikel.util
Class Debug

java.lang.Object
  extended by danbikel.util.Debug
All Implemented Interfaces:
Serializable

public class Debug
extends Object
implements Serializable

Static class that stores the current debugging level (default is zero, for no debugging output), debugging options, and other utility functions for debugging. Its main function also allows the use of BeanShell to perform on-the-fly debugging tests.

See Also:
Serialized Form

Field Summary
static int counter
          A counter with which to count stuff.
static int level
          The current debugging level (default is 0).
 
Constructor Summary
Debug()
           
 
Method Summary
static void fillStringArray(String[] arr, String filler)
          Fills the specified string array with the whitespace-delimited tokens contained in the specified filler argument.
static void setLevel(int newLevel)
          Sets the debugging level to be the specified level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

counter

public static int counter
A counter with which to count stuff.


level

public static int level
The current debugging level (default is 0).

Constructor Detail

Debug

public Debug()
Method Detail

setLevel

public static void setLevel(int newLevel)
Sets the debugging level to be the specified level.

Parameters:
newLevel - the new debugging level

fillStringArray

public static void fillStringArray(String[] arr,
                                   String filler)
Fills the specified string array with the whitespace-delimited tokens contained in the specified filler argument.

This method should probably be in Text.

Parameters:
arr - the array to be filled
filler - a string that will be tokenized based on whitespace and whose tokens will be used to fill the specified array
Throws:
IndexOutOfBoundsException - if the number of whitespace-delimited tokens in filler is greater than the size of arr

Parsing Engine

Author: Dan Bikel.