public class Trace extends Object
Constructor and Description |
---|
Trace(String exceptionsCatchingOption,
String exceptionsThrowingOption,
String methodsEnteringOption,
String methodsExitingOption) |
Modifier and Type | Method and Description |
---|---|
void |
catching(Class<?> clazz,
String methodName,
Throwable throwable)
Traces the catching of the specified throwable in the specified method of
the specified class.
|
void |
entering(Class<?> clazz,
String methodName)
Traces an entry into the specified method of the specified class.
|
void |
entering(Class<?> clazz,
String methodName,
Object parameter)
Traces an entry into the specified method of the specified class,
with the specified parameter.
|
void |
entering(Class<?> clazz,
String methodName,
Object[] parameters)
Traces an entry into the specified method of the specified class,
with the specified parameters.
|
void |
entering(String option,
Class<?> clazz,
String methodName)
Traces an entry into the specified method of the specified class.
|
void |
entering(String option,
Class<?> clazz,
String methodName,
Object parameter)
Traces an entry into the specified method of the specified class,
with the specified parameter.
|
void |
entering(String option,
Class<?> clazz,
String methodName,
Object[] parameters)
Traces an entry into the specified method of the specified class,
with the specified parameters.
|
void |
exiting(Class<?> clazz,
String methodName)
Traces an exit from the specified method of the specified class.
|
void |
exiting(Class<?> clazz,
String methodName,
Object returnValue)
Traces an exit from the specified method of the specified class,
with the specified return value.
|
void |
exiting(String option,
Class<?> clazz,
String methodName)
Traces an exit from the specified method of the specified class.
|
void |
exiting(String option,
Class<?> clazz,
String methodName,
Object returnValue)
Traces an exit from the specified method of the specified class,
with the specified return value.
|
boolean |
shouldTrace(String option)
Queries whether tracing is enabled for the
specified debug option of this plug-in.
|
boolean |
shouldTraceCatching()
Queries whether exception catch tracing is enabled.
|
boolean |
shouldTraceEntering()
Queries whether method entry tracing is enabled.
|
boolean |
shouldTraceEntering(String option)
Queries whether method entry tracing is enabled for the specified
debug option.
|
boolean |
shouldTraceExiting()
Queries whether method exit tracing is enabled.
|
boolean |
shouldTraceExiting(String option)
Queries whether method exit tracing is enabled for the specified
debug option.
|
boolean |
shouldTraceThrowing()
Queries whether exception throw tracing is enabled.
|
void |
throwing(Class<?> clazz,
String methodName,
Throwable throwable)
Traces the throwing of the specified throwable from the specified method
of the specified class.
|
static String |
toString(Object[] array)
Converts an array of objects to a string for trace output.
|
void |
trace(String message)
Traces the specified message from this plug-in.
|
void |
trace(String option,
String message)
Traces the specified message from this plug-in for the specified
debug option.
|
public boolean shouldTraceEntering()
public boolean shouldTraceEntering(String option)
option
- the debug option to testpublic boolean shouldTraceExiting()
public boolean shouldTraceExiting(String option)
option
- the debug option to testpublic boolean shouldTraceCatching()
public boolean shouldTraceThrowing()
public boolean shouldTrace(String option)
option
- The debug option for which to determine trace enablement.public void trace(String message)
message
- The message to be traced.public void trace(String option, String message)
option
- The debug option for which to trace.message
- The message to be traced.public void entering(Class<?> clazz, String methodName)
clazz
- The class whose method is being entered.methodName
- The name of method that is being entered.public void entering(Class<?> clazz, String methodName, Object parameter)
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.public void entering(Class<?> clazz, String methodName, Object[] parameters)
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.public void entering(String option, Class<?> clazz, String methodName)
option
- only trace entering if this option is enabled (in addition
to the generic method-entry option)clazz
- The class whose method is being entered.methodName
- The name of method that is being entered.public void entering(String option, Class<?> clazz, String methodName, Object parameter)
option
- only trace entering if this option is enabled (in addition
to the generic method-entry option)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.public void entering(String option, Class<?> clazz, String methodName, Object[] parameters)
option
- only trace entering if this option is enabled (in addition
to the generic method-entry option)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.public void exiting(Class<?> clazz, String methodName)
clazz
- The class whose method is being exited.methodName
- The name of method that is being exited.public void exiting(Class<?> clazz, String methodName, Object returnValue)
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.public void exiting(String option, Class<?> clazz, String methodName)
option
- only trace entering if this option is enabled (in addition
to the generic method-exit option)clazz
- The class whose method is being exited.methodName
- The name of method that is being exited.public void exiting(String option, Class<?> clazz, String methodName, Object returnValue)
option
- only trace entering if this option is enabled (in addition
to the generic method-exit option)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.public void catching(Class<?> clazz, String methodName, Throwable throwable)
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.public void throwing(Class<?> clazz, String methodName, Throwable throwable)
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.Copyright © 2005, 2018 IBM Corporation and others. All Rights Reserved.