Class Trace

java.lang.Object
org.eclipse.ecf.core.util.Trace

public class Trace extends Object
A utility for tracing debug information. Provides a simple interface for filtering and generating trace output.
  • Field Details

  • Method Details

    • shouldTrace

      protected static boolean shouldTrace(String pluginId)
      Retrieves a Boolean value indicating whether tracing is enabled for the specified plug-in.
      Parameters:
      pluginId - The symbolic plugin id for which to determine trace enablement.
      Returns:
      Whether tracing is enabled for the plug-in.
    • shouldTrace0

      protected static boolean shouldTrace0(String option)
    • shouldTrace

      public static boolean shouldTrace(String pluginId, String option)
      Retrieves a Boolean value indicating whether tracing is enabled for the specified debug option of the specified plug-in.
      Parameters:
      pluginId - The plug-in for which to determine trace enablement.
      option - The debug option for which to determine trace enablement.
      Returns:
      Whether tracing is enabled for the debug option of the plug-in.
    • getArgumentString

      public static String getArgumentString(Object argument)
      Retrieves a textual representation of the specified argument.
      Parameters:
      argument - The argument for which to retrieve a textual representation.
      Returns:
      A textual representation of the specified argument.
    • getArgumentsString

      public static String getArgumentsString(Object[] arguments)
      Retrieves a textual representation of the specified arguments.
      Parameters:
      arguments - The arguments for which to retrieve a textual representation.
      Returns:
      A textual representation of the specified arguments.
    • trace

      protected static void trace(String message)
      Traces the specified message.
      Parameters:
      message - The message to be traced.
    • getTimeString

      protected static String getTimeString()
      Get date and time string
      Returns:
      String with current date and time
    • trace

      public static void trace(String pluginId, String message)
      Traces the specified message from the specified plug-in.
      Parameters:
      pluginId - The plug-in from which to trace.
      message - The message to be traced.
    • trace

      public static void trace(String pluginId, String option, String message)
      Traces the specified message from the specified plug-in for the specified debug option.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      message - The message to be traced.
    • trace

      public static void trace(String pluginId, String option, Class clazz, String methodName, String message)
      Traces the specified message from the specified plug-in for the specified debug option.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being entered.
      methodName - The name of method that is being entered.
      message - The message to be traced.
    • changing

      public static void changing(String pluginId, String option, String valueDescription, Object oldValue, Object newValue)
      Traces the changing of a value.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      valueDescription - The description of the value which is changing.
      oldValue - The old value.
      newValue - The new value.
    • changing

      public static void changing(String pluginId, String option, Class clazz, String methodName, String valueDescription, Object oldValue, Object newValue)
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class in which the value is changing.
      methodName - The name of the method in which the value is changing.
      valueDescription - The description of the value which is changing.
      oldValue - The old value.
      newValue - The new value.
    • catching

      public static void catching(String pluginId, String option, Class clazz, String methodName, Throwable throwable)
      Traces the catching of the specified throwable in the specified method of the specified class.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class in which the throwable is being caught.
      methodName - The name of the method in which the throwable is being caught.
      throwable - The throwable that is being caught.
    • throwing

      public static void throwing(String pluginId, String option, Class clazz, String methodName, Throwable throwable)
      Traces the throwing of the specified throwable from the specified method of the specified class.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class from which the throwable is being thrown.
      methodName - The name of the method from which the throwable is being thrown.
      throwable - The throwable that is being thrown.
    • entering

      public static void entering(String pluginId, String option, Class clazz, String methodName)
      Traces the entering into the specified method of the specified class.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being entered.
      methodName - The name of method that is being entered.
    • entering

      public static void entering(String pluginId, String option, Class clazz, String methodName, Object parameter)
      Traces the entering into the specified method of the specified class, with the specified parameter.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being entered.
      methodName - The name of method that is being entered.
      parameter - The parameter to the method being entered.
    • entering

      public static void entering(String pluginId, String option, Class clazz, String methodName, Object[] parameters)
      Traces the entering into the specified method of the specified class, with the specified parameters.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being entered.
      methodName - The name of method that is being entered.
      parameters - The parameters to the method being entered.
    • exiting

      public static void exiting(String pluginId, String option, Class clazz, String methodName)
      Traces the exiting from the specified method of the specified class.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being exited.
      methodName - The name of method that is being exited.
    • exiting

      public static void exiting(String pluginId, String option, Class clazz, String methodName, Object returnValue)
      Traces the exiting from the specified method of the specified class, with the specified return value.
      Parameters:
      pluginId - The plug-in from which to trace.
      option - The debug option for which to trace.
      clazz - The class whose method is being exited.
      methodName - The name of method that is being exited.
      returnValue - The return value of the method being exited.