synergy.debug
Class Assertion

java.lang.Object
  |
  +--synergy.debug.Assertion

public class Assertion
extends java.lang.Object

This class allows the coders to put in code that simply checks a boolean value or statement and logs the results accordingly.


Constructor Summary
Assertion()
           
 
Method Summary
static boolean doAssert(boolean assertion)
          This method will check the given condition and, if it fails, will generate a fatal error, log it in the log file and exit the system.
static boolean doAssert(boolean assertion, java.lang.String logMessage)
          This will accept a given condition and if it failed, log the message in the log file as a fatal error and exit the system.
static boolean doWarning(boolean assertion)
          This method will check the given condition and, if it fails, will generate a warning, log it in the log file and return the value of the assertion.
static boolean doWarning(boolean assertion, java.lang.String logMessage)
          This will accept a given condition and if it failed, log the message in the log file as a warning.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assertion

public Assertion()
Method Detail

doAssert

public static boolean doAssert(boolean assertion)
This method will check the given condition and, if it fails, will generate a fatal error, log it in the log file and exit the system.
Parameters:
assertion - The condition to check

doAssert

public static boolean doAssert(boolean assertion,
                               java.lang.String logMessage)
This will accept a given condition and if it failed, log the message in the log file as a fatal error and exit the system.
Parameters:
assertion - The condition to check
logMessage - The message to put in the log file

doWarning

public static boolean doWarning(boolean assertion)
This method will check the given condition and, if it fails, will generate a warning, log it in the log file and return the value of the assertion.
Parameters:
assertion - The condition to check

doWarning

public static boolean doWarning(boolean assertion,
                                java.lang.String logMessage)
This will accept a given condition and if it failed, log the message in the log file as a warning.
Parameters:
assertion - The condition to check
logMessage - The message to put in the log file