|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.petals.registry.api.util.Assert
public abstract class Assert
| Constructor Summary | |
|---|---|
Assert()
|
|
| Method Summary | |
|---|---|
static void |
isNull(java.lang.Object object)
Assert that an object is null . |
static void |
isNull(java.lang.Object object,
java.lang.String message)
Assert that an object is null . |
static void |
isTrue(boolean expression)
Assert a boolean expression, throwing IllegalArgumentException if the test result is
false. |
static void |
isTrue(boolean expression,
java.lang.String message)
Assert a boolean expression, throwing IllegalArgumentException if the test result is
false. |
static void |
notNull(java.lang.Object object)
Assert that an object is not null . |
static void |
notNull(java.lang.Object object,
java.lang.String message)
Assert that an object is not null . |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Assert()
| Method Detail |
|---|
public static void isTrue(boolean expression,
java.lang.String message)
IllegalArgumentException if the test result is
false.
Assert.isTrue(i > 0, "The value must be greater than zero");
expression - a boolean expressionmessage - the exception message to use if the assertion fails
java.lang.IllegalArgumentException - if expression is falsepublic static void isTrue(boolean expression)
IllegalArgumentException if the test result is
false.
Assert.isTrue(i > 0);
expression - a boolean expression
java.lang.IllegalArgumentException - if expression is false
public static void isNull(java.lang.Object object,
java.lang.String message)
null .
Assert.isNull(value, "The value must be null");
object - the object to checkmessage - the exception message to use if the assertion fails
java.lang.IllegalArgumentException - if the object is not nullpublic static void isNull(java.lang.Object object)
null .
Assert.isNull(value);
object - the object to check
java.lang.IllegalArgumentException - if the object is not null
public static void notNull(java.lang.Object object,
java.lang.String message)
null .
Assert.notNull(clazz, "The class must not be null");
object - the object to checkmessage - the exception message to use if the assertion fails
java.lang.IllegalArgumentException - if the object is nullpublic static void notNull(java.lang.Object object)
null .
Assert.notNull(clazz);
object - the object to check
java.lang.IllegalArgumentException - if the object is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||