You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.



All Packages  This Package  Class Hierarchy  Class Search  Index

Class calypso.util.Assert

java.lang.Object
   |
   +----calypso.util.Assert

Simple assertion class that throws exceptions when an assertion fails.


public final class  Assert
     extends java.lang.Object
{
          // Fields 1
     static final boolean kEnabled;

          // Constructors 1
     public Assert();

          // Methods 8
     public static final void Assertion(boolean);
     public static final void Assertion(boolean, String);
     public static final void NotReached(String);
     public static final void NotYetImplemented(String);
     public static final void PostCondition(boolean);
     public static final void PostCondition(boolean, String);
     public static final void PreCondition(boolean);
     public static final void PreCondition(boolean, String);
}



Fields


kEnabled

   static final boolean kEnabled



Constructors


Assert

   public Assert() 

Default constructor




Methods


Assertion

   public static final void Assertion(boolean aCondition) 

Throw an exception if aCondition is false.



Assertion

   public static final void Assertion(boolean aCondition, 
                                      String aMessage) 

Throw an exception if aCondition is false.



NotReached

   public static final void NotReached(String msg) 

Throw an exception always. Used when the caller runs across some code that should never be reached.



NotYetImplemented

   public static final void NotYetImplemented(String msg) 

Throw an exception always. Used when the caller runs across some unimplemented functionality in pre-release code.



PreCondition

   public static final void PreCondition(boolean aCondition) 

Throw an exception if aCondition is false.



PreCondition

   public static final void PreCondition(boolean aCondition, 
                                         String aMessage) 

Throw an exception if aCondition is false.



PostCondition

   public static final void PostCondition(boolean aCondition) 

Throw an exception if aCondition is false.



PostCondition

   public static final void PostCondition(boolean aCondition, 
                                          String aMessage) 

Throw an exception if aCondition is false.



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.4