|
|||||||||
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,
java.lang.String string)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object arg)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object[] args)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object arg1,
java.lang.Object arg2)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4)
Standard assertion method for declaring invariants. |
static void |
assertNonFatal(boolean b,
java.lang.String fmt,
java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3,
java.lang.Object arg4,
java.lang.Object arg5)
Standard assertion method for declaring invariants. |
static void |
fail(java.lang.String message)
Helper method equivalent to Assert.that(false, message) |
static void |
fail(java.lang.String fmt,
java.lang.Object... args)
Helper method equivalent to Assert.that(false, message, args) |
static void |
fail(java.lang.Throwable t,
java.lang.String message)
Wraps a throwable into an assertion. |
static void |
fail(java.lang.Throwable t,
java.lang.String fmt,
java.lang.Object... args)
Wraps a throwable into an assertion. |
static void |
that(boolean b,
java.lang.String string)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object a1)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object[] args)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object a1,
java.lang.Object a2)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object a1,
java.lang.Object a2,
java.lang.Object a3)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object a1,
java.lang.Object a2,
java.lang.Object a3,
java.lang.Object a4)
Standard assertion method for declaring invariants. |
static void |
that(boolean b,
java.lang.String fmt,
java.lang.Object a1,
java.lang.Object a2,
java.lang.Object a3,
java.lang.Object a4,
java.lang.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(java.lang.String message)
message
- the message to logpublic static void fail(java.lang.String fmt, java.lang.Object... args)
fmt
- control string for the error messageargs
- the array of arguments to the format string for the
error messagepublic static void fail(java.lang.Throwable t, java.lang.String message)
t
- the trowable to wrapmessage
- the message printed with the assertionpublic static void fail(java.lang.Throwable t, java.lang.String fmt, java.lang.Object... args)
t
- the trowable to wrapfmt
- control string for the error messageargs
- the array of arguments to the format string for the
error messagepublic static void that(boolean b, java.lang.String string)
b
- true if the invariant is true, false
otherwisestring
- message to log with the error
FatalAssertionException
- if the invariant b
is falsepublic static void that(boolean b, java.lang.String fmt, java.lang.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, java.lang.String fmt, java.lang.Object a1, java.lang.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, java.lang.String fmt, java.lang.Object a1, java.lang.Object a2, java.lang.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, java.lang.String fmt, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.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, java.lang.String fmt, java.lang.Object a1, java.lang.Object a2, java.lang.Object a3, java.lang.Object a4, java.lang.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, java.lang.String fmt, java.lang.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, java.lang.String string)
b
- true if the invariant is true, false
otherwisestring
- message to log with the errorpublic static void assertNonFatal(boolean b, java.lang.String fmt, java.lang.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, java.lang.String fmt, java.lang.Object arg1, java.lang.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, java.lang.String fmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.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, java.lang.String fmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.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, java.lang.String fmt, java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.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, java.lang.String fmt, java.lang.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 |