|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.jbo.common.Diagnostic
public final class Diagnostic
The Diagnostic
class contains static tracing methods. It uses an implementation of the IDiagnostic interface to perform output. The implementation chosen can be controlled via command line parameters or properties inside the file /oracle/jbo/common/Diagnostic.properties
.
See the distributed version of this file in {JDEVELOPER_HOME}/modules/oracle.adf.model_11.1.1/adfm.jar
for detailed documentation about the available options for controlling the appearance of trace messages.
Note that all the public functions are declared as static void: this is so that versions of the code could be produced which remove these calls at compile time.
This class cannot be directly instantiated.
DebugDiagnostic
Method Summary | |
---|---|
static void |
ASSERT(boolean test) Conditionally raises an exception. |
static void |
ASSERT(boolean test, java.lang.String message) Conditionally prints a warning method and raises an exception. |
static void |
ASSERT(boolean test, java.lang.String msg, java.lang.Object[] param) Conditionally prints a warning method. |
static IDiagnostic |
getInstance() Returns the IDiagnostic instance. |
static void |
init(java.lang.String reason) initializer that looks at the values of properties in Diagnostic.properties, and sets static state flags that control the details of the trace line |
static boolean |
isOn() |
static boolean |
isOn(int level) |
static boolean |
isStopOnAssert() Programmatic entrypoint to control program flow if an assertion fails. |
static void |
print(java.lang.String message) print a trace line to the diagnostic stream at the default diagnostic level. |
static void |
print(java.lang.String message, int level) print a trace line to the diagnostic stream, at the diagnostic level indicated. |
static void |
println(java.lang.String message) Prints a trace message line to the diagnostic device. |
static void |
println(java.lang.StringBuffer message) Prints a trace message line to the diagnostic device. |
static void |
println(java.lang.String message, int level) print a trace line to the diagnostic stream, at the diagnostic level indicated, and terminate it. |
static void |
printStackTrace() Prints a stack trace for the current environment. |
static void |
printStackTrace(java.lang.Throwable ex) Prints a stack trace for an exception. |
static void |
setQuiet(boolean b) Disables and enables the printing of diagnostic messages. |
static void |
setStopOnAssert(boolean b) Programmatic entrypoint to control program flow if an assertion fails. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static IDiagnostic getInstance()
public static void init(java.lang.String reason)
public static void print(java.lang.String message, int level)
message
- the text of the messagelevel
- the trace level to be associated with this messagepublic static void print(java.lang.String message)
message
- the message to printprint(String)
public static void println(java.lang.String message, int level)
message
- the text of the messagelevel
- the trace level to be associated with this messagepublic static void println(java.lang.String message)
message
- the text to be printed.public static void println(java.lang.StringBuffer message)
message
- the text to be printed.public static void ASSERT(boolean test, java.lang.String msg, java.lang.Object[] param)
The message is constructed from a format string and an array of parameters. An exception is raised if enabled by setStopOnAssert()
.
test
- the result of the test being asserted.msg
- the message's format string.param
- the array of message parameters.JboAssert
- if test
is true
.public static void ASSERT(boolean test, java.lang.String message)
An exception is raised if enabled by setStopOnAssert()
.
test
- the result of the test being asserted.message
- the message.JboAssert
- if test
is true
.public static void ASSERT(boolean test)
An exception is raised if enabled by setStopOnAssert()
.
test
- the result of the test being asserted.JboAssert
- if test
is true
.public static boolean isOn()
public static boolean isOn(int level)
public static void setQuiet(boolean b)
b
- if false
(the default) diagnostic messages are printed, if true
, diagnostic messages are suppressed.public static void setStopOnAssert(boolean b)
ASSERT()
fails, otherwise a trace message is printed.b
- exception throw mode true
or false
ASSERT(boolean)
public static boolean isStopOnAssert()
ASSERT()
fails, otherwise a trace message is printed.ASSERT(boolean)
public static void printStackTrace()
public static void printStackTrace(java.lang.Throwable ex)
ex
- the exception to be traced.
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1) E10653-03 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |