Package org.eclipse.ecf.core.util
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 SummaryFields Modifier and Type Field Description protected static StringLABEL_NEW_VALUELabel indicating new value.protected static StringLABEL_OLD_VALUELabel indicating old value.protected static StringPARENTHESIS_CLOSEString containing a close parenthesis.protected static StringPARENTHESIS_OPENString containing an open parenthesis.protected static StringPREFIX_CATCHINGPrefix for tracing the catching of throwables.protected static StringPREFIX_CHANGINGPrefix for tracing the changing of values.protected static StringPREFIX_ENTERINGPrefix for tracing the entering of methods.protected static StringPREFIX_EXITINGPrefix for tracing the exiting of methods.protected static StringPREFIX_THROWINGPrefix for tracing the throwing of throwables.protected static StringPREFIX_TRACINGPrefix for tracing the changing of values.protected static StringSEPARATOR_METHODSeparator for methods.protected static StringSEPARATOR_PARAMETERSeparator for parameters.protected static StringSEPARATOR_RETURNSeparator for return values.protected static StringSEPARATOR_SPACESeparator containing a space.protected static StringTRACE_STRString containing TRACE
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcatching(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.static voidchanging(String pluginId, String option, Class clazz, String methodName, String valueDescription, Object oldValue, Object newValue)static voidchanging(String pluginId, String option, String valueDescription, Object oldValue, Object newValue)Traces the changing of a value.static voidentering(String pluginId, String option, Class clazz, String methodName)Traces the entering into the specified method of the specified class.static voidentering(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.static voidentering(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.static voidexiting(String pluginId, String option, Class clazz, String methodName)Traces the exiting from the specified method of the specified class.static voidexiting(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.static StringgetArgumentsString(Object[] arguments)Retrieves a textual representation of the specified arguments.static StringgetArgumentString(Object argument)Retrieves a textual representation of the specified argument.protected static StringgetTimeString()Get date and time stringprotected static booleanshouldTrace(String pluginId)Retrieves a Boolean value indicating whether tracing is enabled for the specified plug-in.static booleanshouldTrace(String pluginId, String option)Retrieves a Boolean value indicating whether tracing is enabled for the specified debug option of the specified plug-in.protected static booleanshouldTrace0(String option)static voidthrowing(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.protected static voidtrace(String message)Traces the specified message.static voidtrace(String pluginId, String message)Traces the specified message from the specified plug-in.static voidtrace(String pluginId, String option, Class clazz, String methodName, String message)Traces the specified message from the specified plug-in for the specified debug option.static voidtrace(String pluginId, String option, String message)Traces the specified message from the specified plug-in for the specified debug option.
 
- 
- 
- 
Field Detail- 
PARENTHESIS_OPENprotected static final String PARENTHESIS_OPEN String containing an open parenthesis.- See Also:
- Constant Field Values
 
 - 
PARENTHESIS_CLOSEprotected static final String PARENTHESIS_CLOSE String containing a close parenthesis.- See Also:
- Constant Field Values
 
 - 
TRACE_STRprotected static final String TRACE_STR String containing TRACE- See Also:
- Constant Field Values
 
 - 
PREFIX_TRACINGprotected static final String PREFIX_TRACING Prefix for tracing the changing of values.- See Also:
- Constant Field Values
 
 - 
PREFIX_CHANGINGprotected static final String PREFIX_CHANGING Prefix for tracing the changing of values.- See Also:
- Constant Field Values
 
 - 
PREFIX_CATCHINGprotected static final String PREFIX_CATCHING Prefix for tracing the catching of throwables.- See Also:
- Constant Field Values
 
 - 
PREFIX_THROWINGprotected static final String PREFIX_THROWING Prefix for tracing the throwing of throwables.- See Also:
- Constant Field Values
 
 - 
PREFIX_ENTERINGprotected static final String PREFIX_ENTERING Prefix for tracing the entering of methods.- See Also:
- Constant Field Values
 
 - 
PREFIX_EXITINGprotected static final String PREFIX_EXITING Prefix for tracing the exiting of methods.- See Also:
- Constant Field Values
 
 - 
SEPARATOR_METHODprotected static final String SEPARATOR_METHOD Separator for methods.- See Also:
- Constant Field Values
 
 - 
SEPARATOR_PARAMETERprotected static final String SEPARATOR_PARAMETER Separator for parameters.- See Also:
- Constant Field Values
 
 - 
SEPARATOR_RETURNprotected static final String SEPARATOR_RETURN Separator for return values.- See Also:
- Constant Field Values
 
 - 
SEPARATOR_SPACEprotected static final String SEPARATOR_SPACE Separator containing a space.- See Also:
- Constant Field Values
 
 - 
LABEL_OLD_VALUEprotected static final String LABEL_OLD_VALUE Label indicating old value.- See Also:
- Constant Field Values
 
 - 
LABEL_NEW_VALUEprotected static final String LABEL_NEW_VALUE Label indicating new value.- See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
shouldTraceprotected 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.
 
 - 
shouldTrace0protected static boolean shouldTrace0(String option) 
 - 
shouldTracepublic 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.
 
 - 
getArgumentStringpublic 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.
 
 - 
getArgumentsStringpublic 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.
 
 - 
traceprotected static void trace(String message) Traces the specified message.- Parameters:
- message- The message to be traced.
 
 - 
getTimeStringprotected static String getTimeString() Get date and time string- Returns:
- String with current date and time
 
 - 
tracepublic 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.
 
 - 
tracepublic 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.
 
 - 
tracepublic 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.
 
 - 
changingpublic 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.
 
 - 
changingpublic 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.
 
 - 
catchingpublic 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.
 
 - 
throwingpublic 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.
 
 - 
enteringpublic 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.
 
 - 
enteringpublic 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.
 
 - 
enteringpublic 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.
 
 - 
exitingpublic 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.
 
 - 
exitingpublic 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.
 
 
- 
 
-