ewe.util
Class Debug

java.lang.Object
  extended byewe.util.Debug

public class Debug
extends Object

This class contains a set of useful methods for debugging an application.


Constructor Summary
Debug()
           
 
Method Summary
static OperationTimer disableTiming()
          This method disables and returns the global OperationTimer, which was previously setup by enableTiming().
static void enableTiming()
          This method sets up a global OperationTimer that can be used to time operations.
static void enableTiming(OperationTimer using)
          This method sets up a global OperationTimer that can be used to time operations - using a specific timer.
static void endTiming()
          If enableTiming() was previously called, this method will tell the debug timer to stop timing the current operation, otherwise this method does nothing.
static void startTiming(String operation)
          If enableTiming() was previously called, this method will tell the debug timer to start timing this operation, otherwise this method does nothing.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, toString
 

Constructor Detail

Debug

public Debug()
Method Detail

enableTiming

public static void enableTiming()
This method sets up a global OperationTimer that can be used to time operations. Methods can call Debug.startTiming("An Operation") and this will start the timing of an operation. That method can be safely called even if enableTiming() is not called.


enableTiming

public static void enableTiming(OperationTimer using)
This method sets up a global OperationTimer that can be used to time operations - using a specific timer. Methods can call Debug.startTiming("An Operation") and this will start the timing of an operation. That method can be safely called even if enableTiming() is not called.


disableTiming

public static OperationTimer disableTiming()
This method disables and returns the global OperationTimer, which was previously setup by enableTiming(). If enableTiming() was not previously called, it returns a new empty OperationTimer.


startTiming

public static void startTiming(String operation)
If enableTiming() was previously called, this method will tell the debug timer to start timing this operation, otherwise this method does nothing.


endTiming

public static void endTiming()
If enableTiming() was previously called, this method will tell the debug timer to stop timing the current operation, otherwise this method does nothing.