Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jimi.tools
Class Debug

    java.lang.Object
      |
      +--com.sun.jimi.tools.Debug

public class Debug
extends java.lang.Object

Debug class. This is the preferred class to use when you want to output or log debug info

Since:
  Jimi1.1

Field Summary
`static boolean` | `DEBUG` A static final variable for doing selective compilation of debug info

Constructor Summary
`Debug()`

Method Summary
`static void` | `assert(boolean flag, java.lang.String message)` A basic assert method that can be used to check a condition and create debug info if the condition is false
`static void` | `assertNot(boolean flag, java.lang.String message)` A basic assert method that can be used to check a condition and create debug info if the condition is true
`static void` | `log(java.lang.String message)` Log a message to the current log file selected with setLogLocation
`static void` | `print(java.lang.String message)` Prints a message without linebreak if debugging is turned on
`static void` | `println(java.lang.String message)` Prints a message with linebreak if debugging is turned on
`static void` | `setLogLocation(java.io.OutputStream output)` Set the outputstream to be used for logging with log()
`static void` | `setLogLocation(java.lang.String filename)` Set the filename of the file to be used for logging with log()
`static void` | `stopLogging()` Stop logging (close all open stream used for logging)

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### DEBUG

    public static final boolean DEBUG

  A static final variable for doing selective compilation of debug info

Constructor Detail

### Debug

    public Debug()

Method Detail

### print

    public static void print(java.lang.String message)

  Prints a message without linebreak if debugging is turned on
  Parameters:
    `message` - the message to print

### println

    public static void println(java.lang.String message)

  Prints a message with linebreak if debugging is turned on
  Parameters:
    `message` - the message to print

### assert

    public static void assert(boolean flag,
                              java.lang.String message)

  A basic assert method that can be used to check a condition and create debug info if the condition is false
  Parameters:
    `flag` - the condition to check
    `message` - the message to print if the error

### assertNot

    public static void assertNot(boolean flag,
                                 java.lang.String message)

  A basic assert method that can be used to check a condition and create debug info if the condition is true
  Parameters:
    `flag` - the condition to check
    `message` - the message to print if the error

### setLogLocation

    public static void setLogLocation(java.lang.String filename)
                               throws java.io.IOException

  Set the filename of the file to be used for logging with log()
  Parameters:
    `filename` - the filename of the file to log to using log()
  Throws:
    java.io.IOException - if the file cannot be opened for writing

### setLogLocation

    public static void setLogLocation(java.io.OutputStream output)
                               throws java.io.IOException

  Set the outputstream to be used for logging with log()
  Parameters:
    `output` - the `java.io.OutputStream` to log to using log()
  Throws:
    java.io.IOException - if the file cannot be opened for writing

### log

    public static void log(java.lang.String message)

  Log a message to the current log file selected with setLogLocation
  Parameters:
    `filename` - the filename of the file to log to using log()
  Throws:
    java.io.IOException - if the file cannot be opened for writing

### stopLogging

    public static void stopLogging()

  Stop logging (close all open stream used for logging)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD