Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.1.0)

E10653-02

oracle.jbo.common
Class DebugDiagnostic

java.lang.Object
  extended by oracle.jbo.common.DebugDiagnostic

public final class DebugDiagnostic
extends java.lang.Object

Provides tracing and logging methods for use during application development.

This class cannot be directly instantiated; it is instantiated in DiagonsticFactory#createDiagnostic().

These methods can be invoked even in critical code sections, because all methods in this class will be compiled out of the production release of the product.

Since:
Jdeveloper 3.0
See Also:
DiagnosticFactory

Method Summary
static void ASSERT(boolean test)
          Conditionally raises an exception.
static void ASSERT(boolean test, java.lang.String message)
          Conditionally prints a warning message and raises an exception.
static void ASSERT(boolean test, java.lang.String message, java.lang.Object[] param)
          Conditionally prints a warning message.
static void NULL(java.lang.String s)
          Does nothing: this method allows fragments of code to be embedded that will be compiled away for release-mode builds.
static void print(java.lang.String message)
          Prints a trace message.
static void print(java.lang.String message, int level)
          Prints a trace message to the diagnostic device.
static void println(java.lang.String message)
          Prints a trace message line to the diagnostic device.
static void println(java.lang.String message, int level)
          Prints a trace message line to the diagnostic device.
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 setStopOnAssert(boolean b)
          Enables ASSERT() methods to throw exceptions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

print

public static void print(java.lang.String message,
                         int level)
Prints a trace message to the diagnostic device.

Parameters:
message - the text to be printed.
level - the message's nesting level.

print

public static void print(java.lang.String message)
Prints a trace message.

Parameters:
message - the text to be printed.

println

public static void println(java.lang.String message,
                           int level)
Prints a trace message line to the diagnostic device.

Parameters:
message - the text to be printed.
level - the message's nesting level.

println

public static void println(java.lang.String message)
Prints a trace message line to the diagnostic device.

Parameters:
message - the text to be printed.

ASSERT

public static void ASSERT(boolean test,
                          java.lang.String message,
                          java.lang.Object[] param)
Conditionally prints a warning message.

The message is constructed from a format string and an array of parameters. An exception is raised if enabled by setStopOnAssert().

Parameters:
test - the result of the test being asserted.
message - the message's format string.
param - the array of message parameters.
Throws:
JboAssert - if test is true.

ASSERT

public static void ASSERT(boolean test,
                          java.lang.String message)
Conditionally prints a warning message and raises an exception.

An exception is raised if enabled by setStopOnAssert().

Parameters:
test - the result of the test being asserted.
message - the message.
Throws:
JboAssert - if test is true.

ASSERT

public static void ASSERT(boolean test)
Conditionally raises an exception.

An exception is raised if enabled by setStopOnAssert().

Parameters:
test - the result of the test being asserted.
Throws:
JboAssert - if test is true.

NULL

public static void NULL(java.lang.String s)
Does nothing: this method allows fragments of code to be embedded that will be compiled away for release-mode builds.

Parameters:
s - not used.

setStopOnAssert

public static void setStopOnAssert(boolean b)
Enables ASSERT() methods to throw exceptions.

Parameters:
b - if true, subsequent invocations of ASSERT() methods will throw exceptions.

printStackTrace

public static void printStackTrace()
Prints a stack trace for the current environment.


printStackTrace

public static void printStackTrace(java.lang.Throwable ex)
Prints a stack trace for an exception.

Parameters:
ex - the exception to be traced.

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.1.0)

E10653-02

Copyright © 1997, 2009, Oracle. All rights reserved.