|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.user.util.Assert
public class Assert
| Constructor Summary | |
|---|---|
Assert()
|
|
| Method Summary | |
|---|---|
static void |
isInstanceOf(Class clazz,
Object object)
Assert that the provided object is an instance of the provided class, throwing an IllegalArgumentException if is it not. |
static void |
isInstanceOf(Class clazz,
Object object,
String message)
Assert that the provided object is an instance of the provided class, throwing an IllegalArgumentException if is it not. |
static void |
isTrue(boolean expression,
String message)
Asserts that an expression is true, throwing an IllegalArgumentException if it is false. |
static void |
notNull(Object object,
String message)
Assert that an object is not null, throwing IllegalArgumentException if it is. |
| 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 notNull(Object object,
String message)
object - the object to check for nullmessage - the exception message to use if the assertion fails
IllegalArgumentException - if the object is null
public static void isTrue(boolean expression,
String message)
expression - the expression to checkmessage - the exception message to use if the assertion fails
IllegalArgumentException - if the assertion fails
public static void isInstanceOf(Class clazz,
Object object)
clazz - the required classobject - the object to check
IllegalArgumentException - if the object is not an instance of clazz
public static void isInstanceOf(Class clazz,
Object object,
String message)
clazz - the required classobject - the object to checkmessage - the exception message to use if the assertion fails
IllegalArgumentException - if the object is not an instance of clazz
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||