cern::gp::util::NbAssert Class Reference

Inheritance diagram for cern::gp::util::NbAssert:
Inheritance graph
[legend]
Collaboration diagram for cern::gp::util::NbAssert:
Collaboration graph
[legend]

List of all members.

Public Member Functions

boolean doAssert (boolean condition, String errMsg)

Static Public Member Functions

static boolean assertTrue (boolean condition, String errMsg)

Static Private Member Functions

static final NbAssert get ()

Static Private Attributes

static NbAssert ass = null
static final Object lock = new Object()

Detailed Description

A Netbeans oriented implementation of the Assert mechanism. Can be called either directly, using the static NbAssert.assertTrue method or from the principal Assert class

See also:
cern.spsea.util.Assert
Author:
Vito Baggiolini 29-04-02
Version:
0.3 3-May-02

Member Function Documentation

static boolean cern::gp::util::NbAssert::assertTrue ( boolean  condition,
String  errMsg 
) [inline, static]

asserts a condition. Does nothing if the condition is true, shows the error message in a JDialog if the condition is false beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition
Deprecated:
(use assertTrue() instead)

asserts a condition. Does nothing if the condition is true, shows the error message in a JDialog if the condition is false beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition

References doAssert().

boolean cern::gp::util::NbAssert::doAssert ( boolean  condition,
String  errMsg 
) [inline]

implementation of the IAssert interface. Called either from the assertTrue method in this class or from the assertTrue method in the main Assert class. beware: Unlike the normal cern.spsea.util.Assert#assertTrue(boolean, String) method execution continues after this statement, it does not throw a RuntimeException. If the program cannot continue after an assertion failure, you have to take appropriate measures yourself

Parameters:
condition the condition to be checked
errMsg the message to be displayed if the condition is false
Returns:
the condition
See also:
cern.spsea.util.Assert

Implements cern::gp::util::IAssert.

Referenced by assertTrue().

static final NbAssert cern::gp::util::NbAssert::get (  )  [inline, static, private]

factory method, initializes and/or returns the NbAssert singleton

References ass, and lock.


Member Data Documentation

NbAssert cern::gp::util::NbAssert::ass = null [static, private]

Referenced by get().

final Object cern::gp::util::NbAssert::lock = new Object() [static, private]

Referenced by get().


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2