ariba.util.core
Class Assert

java.lang.Object
  extended by ariba.util.core.Assert

public final class Assert
extends java.lang.Object

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

fail

public static void fail(java.lang.String message)
Helper method equivalent to Assert.that(false, message)

Parameters:
message - the message to log

fail

public static void fail(java.lang.String fmt,
                        java.lang.Object... args)
Helper method equivalent to Assert.that(false, message, args)

Parameters:
fmt - control string for the error message
args - the array of arguments to the format string for the error message

fail

public static void fail(java.lang.Throwable t,
                        java.lang.String message)
Wraps a throwable into an assertion.

Parameters:
t - the trowable to wrap
message - the message printed with the assertion

fail

public static void fail(java.lang.Throwable t,
                        java.lang.String fmt,
                        java.lang.Object... args)
Wraps a throwable into an assertion.

Parameters:
t - the trowable to wrap
fmt - control string for the error message
args - the array of arguments to the format string for the error message

that

public static void that(boolean b,
                        java.lang.String string)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
string - message to log with the error
Throws:
FatalAssertionException - if the invariant b is false

that

public static void that(boolean b,
                        java.lang.String fmt,
                        java.lang.Object a1)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
a1 - the first argument to the format string for the error message.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object)

that

public static void that(boolean b,
                        java.lang.String fmt,
                        java.lang.Object a1,
                        java.lang.Object a2)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
a1 - the first argument to the format string for the error message.
a2 - the second argument to the format string for the error message.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object, Object)

that

public 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. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
a1 - 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.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object, Object)

that

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)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
a1 - 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.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object, Object)

that

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)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
a1 - 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.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object, Object)

that

public static void that(boolean b,
                        java.lang.String fmt,
                        java.lang.Object[] args)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged and a FatalAssertionException is thrown.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
args - the array of arguments to the format string for the error message.
Throws:
FatalAssertionException - if the invariant b is false
See Also:
Fmt.S(String, Object)

assertNonFatal

public static void assertNonFatal(boolean b,
                                  java.lang.String string)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
string - message to log with the error

assertNonFatal

public static void assertNonFatal(boolean b,
                                  java.lang.String fmt,
                                  java.lang.Object arg)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
arg - the first argument to the format string for the error message.

assertNonFatal

public static void assertNonFatal(boolean b,
                                  java.lang.String fmt,
                                  java.lang.Object arg1,
                                  java.lang.Object arg2)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
arg1 - the first argument to the format string for the error message.
arg2 - the second argument to the format string for the error message.

assertNonFatal

public 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. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
arg1 - 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.

assertNonFatal

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)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
arg1 - 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.

assertNonFatal

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)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
arg1 - 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.

assertNonFatal

public static void assertNonFatal(boolean b,
                                  java.lang.String fmt,
                                  java.lang.Object[] args)
Standard assertion method for declaring invariants. If b is false, an error message including the specified string is logged.

Parameters:
b - true if the invariant is true, false otherwise
fmt - control string for the error message as used in Fmt.S
args - the arguments to the format string for the error message.


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.