|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectariba.util.core.Assert
public final class Assert
This class defines and implements various Assert methods
| Method Summary | |
|---|---|
static void |
assertNonFatal(boolean b,
String string)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object arg)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object[] args)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5)
Standard assertion method for declaring invariants. |
static void |
fail(String message)
Helper method equivalent to Assert.that(false, message) |
static void |
fail(String fmt,
Object... args)
Helper method equivalent to Assert.that(false, message, args) |
static void |
fail(Throwable t,
String message)
Wraps a throwable into an assertion. |
static void |
fail(Throwable t,
String fmt,
Object... args)
Wraps a throwable into an assertion. |
static void |
that(boolean b,
String string)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object a1)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object[] args)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object a1,
Object a2)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3,
Object a4)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3,
Object a4,
Object a5)
Standard assertion method for declaring invariants. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void fail(String message)
message - the message to log
public static void fail(String fmt,
Object... args)
fmt - control string for the error messageargs - the array of arguments to the format string for the
error message
public static void fail(Throwable t,
String message)
t - the trowable to wrapmessage - the message printed with the assertion
public static void fail(Throwable t,
String fmt,
Object... args)
t - the trowable to wrapfmt - control string for the error messageargs - the array of arguments to the format string for the
error message
public static void that(boolean b,
String string)
b - true if the invariant is true, false
otherwisestring - message to log with the error
FatalAssertionException - if the invariant b
is false
public static void that(boolean b,
String fmt,
Object a1)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sa1 - the first argument to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object)
public static void that(boolean b,
String fmt,
Object a1,
Object a2)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sa1 - the first argument to the format string for the
error message.a2 - the second argument to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object, Object)
public static void that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sa1 - the first argument to the format string for the
error message.a2 - the second argument to the format string for the
error message.a3 - the third argument to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object, Object)
public static void that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3,
Object a4)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sa1 - the first argument to the format string for the
error message.a2 - the second argument to the format string for the
error message.a3 - the third argument to the format string for the
error message.a4 - the fourth argument to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object, Object)
public static void that(boolean b,
String fmt,
Object a1,
Object a2,
Object a3,
Object a4,
Object a5)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sa1 - the first argument to the format string for the
error message.a2 - the second argument to the format string for the
error message.a3 - the third argument to the format string for the
error message.a4 - the fourth argument to the format string for the
error message.a5 - the fifth argument to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object, Object)
public static void that(boolean b,
String fmt,
Object[] args)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sargs - the array of arguments to the format string for the
error message.
FatalAssertionException - if the invariant b
is falseFmt.S(String, Object)
public static void assertNonFatal(boolean b,
String string)
b - true if the invariant is true, false
otherwisestring - message to log with the error
public static void assertNonFatal(boolean b,
String fmt,
Object arg)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sarg - the first argument to the format string for the
error message.
public static void assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sarg1 - the first argument to the format string for the
error message.arg2 - the second argument to the format string for the
error message.
public static void assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sarg1 - the first argument to the format string for the
error message.arg2 - the second argument to the format string for the
error message.arg3 - the third argument to the format string for the
error message.
public static void assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sarg1 - the first argument to the format string for the
error message.arg2 - the second argument to the format string for the
error message.arg3 - the third argument to the format string for the
error message.arg4 - the fourth argument to the format string for the
error message.
public static void assertNonFatal(boolean b,
String fmt,
Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sarg1 - the first argument to the format string for the
error message.arg2 - the second argument to the format string for the
error message.arg3 - the third argument to the format string for the
error message.arg4 - the fourth argument to the format string for the
error message.arg5 - the fifth argument to the format string for the
error message.
public static void assertNonFatal(boolean b,
String fmt,
Object[] args)
b - true if the invariant is true, false
otherwisefmt - control string for the error message as used in
Fmt.Sargs - the arguments to the format string for the
error message.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||