org.eclipse.gmf.runtime.common.core.util
Class Trace
java.lang.Object
org.eclipse.gmf.runtime.common.core.util.Trace
-
public class Trace
- extends java.lang.Object
A utility for tracing debug information. Provides a simple interface for
filtering and generating trace output.
Field Summary
|
protected static java.lang.String
|
LABEL_NEW_VALUE
Label indicating new value. |
protected static java.lang.String
|
LABEL_OLD_VALUE
Label indicating old value. |
protected static java.lang.String
|
PARENTHESIS_CLOSE
String containing a close parenthesis. |
protected static java.lang.String
|
PARENTHESIS_OPEN
String containing an open parenthesis. |
protected static java.lang.String
|
PREFIX_CATCHING
Prefix for tracing the catching of throwables. |
protected static java.lang.String
|
PREFIX_CHANGING
Prefix for tracing the changing of values. |
protected static java.lang.String
|
PREFIX_ENTERING
Prefix for tracing the entering of methods. |
protected static java.lang.String
|
PREFIX_EXITING
Prefix for tracing the exiting of methods. |
protected static java.lang.String
|
PREFIX_THROWING
Prefix for tracing the throwing of throwables. |
protected static java.lang.String
|
SEPARATOR_METHOD
Separator for methods. |
protected static java.lang.String
|
SEPARATOR_PARAMETER
Separator for parameters. |
protected static java.lang.String
|
SEPARATOR_RETURN
Separator for return values. |
protected static java.lang.String
|
SEPARATOR_SPACE
Separator containing a space. |
Method Summary
|
static void
|
catching
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Throwable throwable)
Traces the catching of the specified throwable in the specified method of
the specified class. |
static void
|
changing
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.String valueDescription,
java.lang.Object oldValue,
java.lang.Object newValue)
|
static void
|
changing
(
Plugin plugin,
java.lang.String option,
java.lang.String valueDescription,
java.lang.Object oldValue,
java.lang.Object newValue)
Traces the changing of a value. |
static void
|
entering
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName)
Traces the entering into the specified method of the specified class. |
static void
|
entering
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object parameter)
Traces the entering into the specified method of the specified class,
with the specified parameter. |
static void
|
entering
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object[] parameters)
Traces the entering into the specified method of the specified class,
with the specified parameters. |
static void
|
exiting
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName)
Traces the exiting from the specified method of the specified class. |
static void
|
exiting
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object returnValue)
Traces the exiting from the specified method of the specified class,
with the specified return value. |
protected static java.lang.String
|
getArgumentsString
(java.lang.Object[] arguments)
Retrieves a textual representation of the specified arguments. |
protected static java.lang.String
|
getArgumentString
(java.lang.Object argument)
Retrieves a textual representation of the specified argument. |
protected static boolean
|
shouldTrace
(
Plugin plugin)
Retrieves a Boolean value indicating whether tracing is enabled for the
specified plug-in. |
static boolean
|
shouldTrace
(
Plugin plugin,
java.lang.String option)
Retrieves a Boolean value indicating whether tracing is enabled for the
specified debug option of the specified plug-in. |
static void
|
throwing
(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Throwable throwable)
Traces the throwing of the specified throwable from the specified method
of the specified class. |
static void
|
trace
(
Plugin plugin,
java.lang.String message)
Traces the specified message from the specified plug-in. |
static void
|
trace
(
Plugin plugin,
java.lang.String option,
java.lang.String message)
Traces the specified message from the specified plug-in for the specified
debug option. |
protected static void
|
trace
(java.lang.String message)
Traces the specified message. |
Methods inherited from class java.lang.Object
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
|
PARENTHESIS_OPEN
protected static final java.lang.String PARENTHESIS_OPEN
- String containing an open parenthesis.
-
See Also:
-
Constant Field Values
PARENTHESIS_CLOSE
protected static final java.lang.String PARENTHESIS_CLOSE
- String containing a close parenthesis.
-
See Also:
-
Constant Field Values
PREFIX_CHANGING
protected static final java.lang.String PREFIX_CHANGING
- Prefix for tracing the changing of values.
-
See Also:
-
Constant Field Values
PREFIX_CATCHING
protected static final java.lang.String PREFIX_CATCHING
- Prefix for tracing the catching of throwables.
-
See Also:
-
Constant Field Values
PREFIX_THROWING
protected static final java.lang.String PREFIX_THROWING
- Prefix for tracing the throwing of throwables.
-
See Also:
-
Constant Field Values
PREFIX_ENTERING
protected static final java.lang.String PREFIX_ENTERING
- Prefix for tracing the entering of methods.
-
See Also:
-
Constant Field Values
PREFIX_EXITING
protected static final java.lang.String PREFIX_EXITING
- Prefix for tracing the exiting of methods.
-
See Also:
-
Constant Field Values
SEPARATOR_METHOD
protected static final java.lang.String SEPARATOR_METHOD
- Separator for methods.
-
See Also:
-
Constant Field Values
SEPARATOR_PARAMETER
protected static final java.lang.String SEPARATOR_PARAMETER
- Separator for parameters.
-
See Also:
-
Constant Field Values
SEPARATOR_RETURN
protected static final java.lang.String SEPARATOR_RETURN
- Separator for return values.
-
See Also:
-
Constant Field Values
SEPARATOR_SPACE
protected static final java.lang.String SEPARATOR_SPACE
- Separator containing a space.
-
See Also:
-
Constant Field Values
LABEL_OLD_VALUE
protected static final java.lang.String LABEL_OLD_VALUE
- Label indicating old value.
-
See Also:
-
Constant Field Values
LABEL_NEW_VALUE
protected static final java.lang.String LABEL_NEW_VALUE
- Label indicating new value.
-
See Also:
-
Constant Field Values
shouldTrace
protected static boolean shouldTrace(
Plugin plugin)
- Retrieves a Boolean value indicating whether tracing is enabled for the
specified plug-in.
-
-
Parameters:
-
plugin
- The plug-in for which to determine trace enablement.
-
Returns:
- Whether tracing is enabled for the plug-in.
shouldTrace
public static boolean shouldTrace(
Plugin plugin,
java.lang.String option)
- Retrieves a Boolean value indicating whether tracing is enabled for the
specified debug option of the specified plug-in.
-
-
Parameters:
-
plugin
- 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
protected static java.lang.String getArgumentString(java.lang.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
protected static java.lang.String getArgumentsString(java.lang.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(java.lang.String message)
- Traces the specified message.
-
-
Parameters:
-
message
- The message to be traced.
trace
public static void trace(
Plugin plugin,
java.lang.String message)
- Traces the specified message from the specified plug-in.
-
-
Parameters:
-
plugin
- The plug-in from which to trace. -
message
- The message to be traced.
trace
public static void trace(
Plugin plugin,
java.lang.String option,
java.lang.String message)
- Traces the specified message from the specified plug-in for the specified
debug option.
-
-
Parameters:
-
plugin
- The plug-in from which to trace. -
option
- The debug option for which to trace. -
message
- The message to be traced.
changing
public static void changing(
Plugin plugin,
java.lang.String option,
java.lang.String valueDescription,
java.lang.Object oldValue,
java.lang.Object newValue)
- Traces the changing of a value.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.String valueDescription,
java.lang.Object oldValue,
java.lang.Object newValue)
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Throwable throwable)
- Traces the catching of the specified throwable in the specified method of
the specified class.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Throwable throwable)
- Traces the throwing of the specified throwable from the specified method
of the specified class.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName)
- Traces the entering into the specified method of the specified class.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object parameter)
- Traces the entering into the specified method of the specified class,
with the specified parameter.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object[] parameters)
- Traces the entering into the specified method of the specified class,
with the specified parameters.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName)
- Traces the exiting from the specified method of the specified class.
-
-
Parameters:
-
plugin
- 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(
Plugin plugin,
java.lang.String option,
java.lang.Class clazz,
java.lang.String methodName,
java.lang.Object returnValue)
- Traces the exiting from the specified method of the specified class,
with the specified return value.
-
-
Parameters:
-
plugin
- 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.
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.