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