public abstract class

Assert

extends Object
java.lang.Object
   ↳ com.pnfsoftware.jeb.util.base.Assert

Class Overview

A replacement for built-in asserts. Production-compatible assert-likes. Do not throw AssertionError on failure; instead, a RuntimeException is raised.

Assert methods throw RuntimeException. The stacktrace of such as exception is adjusted to reflect the actual code line where a(...) or fail(...) was called.

Summary

Public Constructors
Assert()
Public Methods
static void a(boolean expression, String message)
Assert that condition is true
static void a(boolean expression, String message, Object... args)
static void a(boolean expression)
static void debugFail(String message)
Fail ONLY on debug builds.
static void debugFail(Throwable t)
static void debugFail()
Fail ONLY on debug builds.
static void fail(String message)
static void fail()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public Assert ()

Public Methods

public static void a (boolean expression, String message)

Assert that condition is true

public static void a (boolean expression, String message, Object... args)

public static void a (boolean expression)

public static void debugFail (String message)

Fail ONLY on debug builds. Use carefully; this method can yield side-effect bugs on release builds that would have otherwise be caught in debug mode.

public static void debugFail (Throwable t)

public static void debugFail ()

Fail ONLY on debug builds. Use carefully; this method can yield side-effect bugs on release builds that would have otherwise be caught in debug mode.

public static void fail (String message)

public static void fail ()