org.mozilla.jss.util

Class Assert

public class Assert extends Object

C-style assertions in Java. These methods are only active in debug mode (org.mozilla.jss.Debug.DEBUG==true).

See Also: Debug AssertionException

Method Summary
static voidnotReached(String msg)
Throw an AssertionException if this statement is reached.
static voidnotReached()
Throw an AssertionException if this statement is reached.
static voidnotYetImplemented(String msg)
Throw an AssertionException because functionlity is not yet implemented.
static void_assert(boolean cond)
Assert that a condition is true.
static void_assert(boolean cond, String msg)
Assert that a condition is true.

Method Detail

notReached

public static void notReached(String msg)
Throw an AssertionException if this statement is reached.

Parameters: msg A message describing what was reached.

notReached

public static void notReached()
Throw an AssertionException if this statement is reached.

notYetImplemented

public static void notYetImplemented(String msg)
Throw an AssertionException because functionlity is not yet implemented.

Parameters: msg A message describing what is not implemented.

_assert

public static void _assert(boolean cond)
Assert that a condition is true. If it is not true, abort by throwing an AssertionException.

Parameters: cond The condition that is being tested.

_assert

public static void _assert(boolean cond, String msg)
Assert that a condition is true. If it is not true, abort by throwing an AssertionException.

Parameters: cond The condition that is being tested. msg A message describing what is wrong if the condition is false.