java.lang.Object | |
↳ | com.pnfsoftware.jeb.util.base.Assert |
A replacement for built-in assert
s. 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.
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
|
Assert that condition is true
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.
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.