|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.util.Assert
public final class Assert
An internal Assertion mechanism used to throw exceptions as needed Typically, application developers are likely to see one of these thrown exceptions only if they call into SDK api's with NULL arguments which are unexpected. Hence, they are most likely to be caught early in the application development cycle. End user applications, once developed, should not see these exceptions thrown
| Method Summary | |
|---|---|
static void |
argIsTrue(boolean expr,
java.lang.String message)
Throw an IllegalArgumentException |
static void |
argNotNull(java.lang.Object obj,
java.lang.String message)
Throw an IllegalArgumentException |
static void |
internalError(java.lang.String strContext)
Throws a SDKRuntimeException indicating that an unexpected, internal error has occurred. |
static void |
internalError(java.lang.String strContext,
java.lang.Exception e)
Throws a SDKRuntimeException indicating that an unexpected, internal error has occurred. |
static void |
isTrue(boolean expr,
java.lang.String message)
Throw a RuntimeException |
static void |
notNull(java.lang.Object obj,
java.lang.String message)
Throw a NullPointerException |
static void |
nullArgument(java.lang.String strClassName)
Throws an IllegalArgumentException indicating that a null parameter was detected. |
static void |
nullArgument(java.lang.String strClassName,
java.lang.String strArgName)
Throw an IllegalArgumentException |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static final void isTrue(boolean expr,
java.lang.String message)
RuntimeException
expr - the expression that should evaluate to truemessage - the message to include in the thrown exception
public static final void notNull(java.lang.Object obj,
java.lang.String message)
NullPointerException
obj - The object that should evaluate to nullmessage - the message to include in the thrown exception
public static final void argIsTrue(boolean expr,
java.lang.String message)
IllegalArgumentException
expr - the expression that should evaluate to truemessage - the message to include in the thrown exception
public static final void argNotNull(java.lang.Object obj,
java.lang.String message)
IllegalArgumentException
obj - the object that should evaluate to nullmessage - the message to include in the thrown exceptionpublic static void internalError(java.lang.String strContext)
strContext - A string that uniquely identifies this internal error in the
source code. Normally includes at least the class name and
method name where the exception was triggered (for example,
"MyClass.method()"). If that alone is not a unique identifier,
then additional context is required. Information that may help
to diagnose the problem may also be included, but is not
required. strContext should not be localized.
public static void internalError(java.lang.String strContext,
java.lang.Exception e)
strContext - A string that uniquely identifies this internal error in the
source code. Normally includes at least the class name and
method name where the exception was triggered (for example,
"MyClass.method()"). If that alone is not a unique identifier,
then additional context is required. Information that may help
to diagnose the problem may also be included, but is not
required. strContext should not be localized.e - an Exception that is aggregated into the thrown container
exceptionpublic static void nullArgument(java.lang.String strClassName)
strClassName - The class that represents the parameter type (for example,
"String", "GroupAccount", etc.). The class name should not be
localized.
public static void nullArgument(java.lang.String strClassName,
java.lang.String strArgName)
IllegalArgumentException
strClassName - The class that represents the parameter typestrArgName - The argument that represents the parameter type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||