Skip navigation links

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

E52932-01


oracle.jbo.common
Class Diagnostic

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


public final class Diagnostic
extends java.lang.Object

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.

Since:
JDeveloper 2.0
See Also:
DebugDiagnostic

Field Summary
static java.lang.String AMPOOL_LIFECYCLE_LOGGER
          Used in AMPool lifecycle diagnostics
static java.lang.String APPLICATIONSCRIPT_LOGGER
          Used in jedi-consumer script logs
static java.lang.String BUS_EVENT_LOGGER
          Used in Business Events diagnostics
static java.lang.String CPX_CUSTOMIZATIONS_LOGGER
          Used in cpx loading and customization reloading diagnostics.
static java.lang.String DCFRAME_MANAGEMENT_LOGGER
          Used in DataControlFrame manipulation diagnostics
static java.lang.String DEF_CUSTOMIZATIONS_LOGGER
           
static java.lang.String DEFAULT_VALUE_SERIALIZER_LOGGER
          Used in DefaultValueSerializer diagnostics
static java.lang.String ENTITY_EXPRVALUESUPPLIER_LOGGER
          Entity Script expression value supplier logger
static java.lang.String GLOBAL_GROOVYFUNCTIONS_LOGGER
          Used in Global Groovy function loading diagnostics
static java.lang.String HIERBINDING_KEYLOOKUP_LOGGER
          Used in Hierarchical binding diagnostics
static java.lang.String JPX_SETTINGS_LOGGER
          Used in JPX Settings load diagnostics
static java.lang.String LOBDOMAIN_LOGGER
          Used in adf-model LobDomain diagnostics
static java.lang.String PROGRAMMATIC_VO_LOGGER
          Used in ProgrammaticViewObject diagnostics
static java.lang.String PROPERTIES_LOOKUP_LOGGER
          Used in Properties implemenation diagnostics
static java.lang.String ROWFINDER_LOGGER
          Used in RowFinder execution diagnostics
static java.lang.String SERVINT_PUBLISHER_LOGGER
          Used in Service Publisher diagnostics
static java.lang.String SERVINT_RT_LOGGER
          Used in Service Runtime diagnostics
static java.lang.String SERVINT_SCHEMAGEN_LOGGER
          Used in Service Schema Generation diagnostics
static java.lang.String SIMPLCUST_EXPRDEBUGGER_LOGGER
           
static java.lang.String SIMPLCUST_FUNCTIONS_LOGGER
           
static java.lang.String SQLBUILDER_LOGGER
          Used in adf-model SQLBuilder diagnostics
static java.lang.String STRINGMANAGER_LOGGER
          Used in StringManager implemenation diagnostics
static java.lang.String VERSION_LOGGER
           
static java.lang.String VIEW_CRITERIA_LOGGER
          Used in View Criteria diagnostics

 

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 isContextOn()
           
static boolean isContextOn(int level)
           
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

 

Field Detail

APPLICATIONSCRIPT_LOGGER

public static final java.lang.String APPLICATIONSCRIPT_LOGGER
Used in jedi-consumer script logs
See Also:
Constant Field Values

AMPOOL_LIFECYCLE_LOGGER

public static final java.lang.String AMPOOL_LIFECYCLE_LOGGER
Used in AMPool lifecycle diagnostics
See Also:
Constant Field Values

LOBDOMAIN_LOGGER

public static final java.lang.String LOBDOMAIN_LOGGER
Used in adf-model LobDomain diagnostics
See Also:
Constant Field Values

SQLBUILDER_LOGGER

public static final java.lang.String SQLBUILDER_LOGGER
Used in adf-model SQLBuilder diagnostics
See Also:
Constant Field Values

JPX_SETTINGS_LOGGER

public static final java.lang.String JPX_SETTINGS_LOGGER
Used in JPX Settings load diagnostics
See Also:
Constant Field Values

GLOBAL_GROOVYFUNCTIONS_LOGGER

public static final java.lang.String GLOBAL_GROOVYFUNCTIONS_LOGGER
Used in Global Groovy function loading diagnostics
See Also:
Constant Field Values

SIMPLCUST_FUNCTIONS_LOGGER

public static final java.lang.String SIMPLCUST_FUNCTIONS_LOGGER
See Also:
Constant Field Values

SIMPLCUST_EXPRDEBUGGER_LOGGER

public static final java.lang.String SIMPLCUST_EXPRDEBUGGER_LOGGER
See Also:
Constant Field Values

DCFRAME_MANAGEMENT_LOGGER

public static final java.lang.String DCFRAME_MANAGEMENT_LOGGER
Used in DataControlFrame manipulation diagnostics
See Also:
Constant Field Values

BUS_EVENT_LOGGER

public static final java.lang.String BUS_EVENT_LOGGER
Used in Business Events diagnostics
See Also:
Constant Field Values

HIERBINDING_KEYLOOKUP_LOGGER

public static final java.lang.String HIERBINDING_KEYLOOKUP_LOGGER
Used in Hierarchical binding diagnostics
See Also:
Constant Field Values

PROGRAMMATIC_VO_LOGGER

public static final java.lang.String PROGRAMMATIC_VO_LOGGER
Used in ProgrammaticViewObject diagnostics
See Also:
Constant Field Values

DEFAULT_VALUE_SERIALIZER_LOGGER

public static final java.lang.String DEFAULT_VALUE_SERIALIZER_LOGGER
Used in DefaultValueSerializer diagnostics
See Also:
Constant Field Values

VIEW_CRITERIA_LOGGER

public static final java.lang.String VIEW_CRITERIA_LOGGER
Used in View Criteria diagnostics
See Also:
Constant Field Values

CPX_CUSTOMIZATIONS_LOGGER

public static final java.lang.String CPX_CUSTOMIZATIONS_LOGGER
Used in cpx loading and customization reloading diagnostics. Bug13704249.
See Also:
Constant Field Values

DEF_CUSTOMIZATIONS_LOGGER

public static final java.lang.String DEF_CUSTOMIZATIONS_LOGGER
See Also:
Constant Field Values

PROPERTIES_LOOKUP_LOGGER

public static final java.lang.String PROPERTIES_LOOKUP_LOGGER
Used in Properties implemenation diagnostics
See Also:
Constant Field Values

STRINGMANAGER_LOGGER

public static final java.lang.String STRINGMANAGER_LOGGER
Used in StringManager implemenation diagnostics
See Also:
Constant Field Values

ENTITY_EXPRVALUESUPPLIER_LOGGER

public static final java.lang.String ENTITY_EXPRVALUESUPPLIER_LOGGER
Entity Script expression value supplier logger
See Also:
Constant Field Values

SERVINT_PUBLISHER_LOGGER

public static final java.lang.String SERVINT_PUBLISHER_LOGGER
Used in Service Publisher diagnostics
See Also:
Constant Field Values

ROWFINDER_LOGGER

public static final java.lang.String ROWFINDER_LOGGER
Used in RowFinder execution diagnostics
See Also:
Constant Field Values

SERVINT_RT_LOGGER

public static final java.lang.String SERVINT_RT_LOGGER
Used in Service Runtime diagnostics
See Also:
Constant Field Values

SERVINT_SCHEMAGEN_LOGGER

public static final java.lang.String SERVINT_SCHEMAGEN_LOGGER
Used in Service Schema Generation diagnostics
See Also:
Constant Field Values

VERSION_LOGGER

public static final java.lang.String VERSION_LOGGER
See Also:
Constant Field Values

Method Detail

getInstance

public static IDiagnostic getInstance()
Returns the IDiagnostic instance.

init

public 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

print

public static void print(java.lang.String message,
                         int level)
print a trace line to the diagnostic stream, at the diagnostic level indicated.
Parameters:
message - the text of the message
level - the trace level to be associated with this message

print

public static void print(java.lang.String message)
print a trace line to the diagnostic stream at the default diagnostic level.
Parameters:
message - the message to print
See Also:
print(String)

println

public 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.
Parameters:
message - the text of the message
level - the trace level to be associated with this message

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.

println

public static void println(java.lang.StringBuffer 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 msg,
                          java.lang.Object[] param)
Conditionally prints a warning method.

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.
msg - 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 method 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.

isOn

public static boolean isOn()

isOn

public static boolean isOn(int level)

isContextOn

public static boolean isContextOn()

isContextOn

public static boolean isContextOn(int level)

setQuiet

public static void setQuiet(boolean b)
Disables and enables the printing of diagnostic messages.
Parameters:
b - if false (the default) diagnostic messages are printed, if true, diagnostic messages are suppressed.

setStopOnAssert

public static void setStopOnAssert(boolean b)
Programmatic entrypoint to control program flow if an assertion fails. If it is set to true, then BC4J clients will receive an exception if an ASSERT() fails, otherwise a trace message is printed.
Parameters:
b - exception throw mode true or false
See Also:
ASSERT(boolean)

isStopOnAssert

public static boolean isStopOnAssert()
Programmatic entrypoint to control program flow if an assertion fails. If it is set to true, then BC4J clients will receive an exception if an ASSERT() fails, otherwise a trace message is printed.
See Also:
ASSERT(boolean)

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.

Skip navigation links

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

E52932-01


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