Methods Summary |
---|
public static void | check(boolean b, java.lang.String s)Check an assertion if (doCheck && !b)
toss(s);
|
public static void | check(long x)Check an assertion if (doCheck && x == 0)
toss();
|
public static void | check(boolean b)Check an assertion if (doCheck && !b)
toss();
|
public static void | check(java.lang.Object obj, java.lang.String s)Check an assertion if (doCheck && obj == null)
toss(s);
|
public static void | check(java.lang.String checkMe, java.lang.String s)Check an assertion if (doCheck && (checkMe == null || checkMe.length() <= 0))
toss(s);
|
public static void | check(java.lang.String checkMe)Check an assertion if (doCheck && (checkMe == null || checkMe.length() <= 0))
toss();
|
public static void | check(java.lang.Object obj)Check an assertion if (doCheck && obj == null)
toss();
|
public static void | check(double x, java.lang.String s)Check an assertion if (doCheck && x == 0)
toss(s);
|
public static void | check(double x)Check an assertion if (doCheck && x == 0)
toss();
|
public static void | check(long x, java.lang.String s)Check an assertion if (doCheck && x == 0)
toss(s);
|
private static java.lang.String | getCallerInfo()
try
{
CallerInfo ci = new CallerInfo( new Object[] { staticInstance });
return ci.toString();
}
catch(CallerInfoException e)
{
return null;
}
|
public static void | main(java.lang.String[] args)test stub
Assertion.check(args);
Assertion.check(args.length, "No command line arguments");//NOI18N
|
public static void | setCheck(boolean c)Turn checking on or off doCheck = c;
|
private static void | toss()
toss(null);
|
private static void | toss(java.lang.String gripe)
String msg = "\nAssertion failed";//NOI18N
String ci = getCallerInfo();
if(ci != null)
{
msg += " at " + ci;//NOI18N
}
if(gripe != null)
msg += " --> " + gripe;//NOI18N
throw new Failure(msg);
|