org.mmtk.vm
Class Assert

java.lang.Object
  extended by org.mmtk.vm.Assert
Direct Known Subclasses:
Assert

public abstract class Assert
extends Object


Constructor Summary
Assert()
           
 
Method Summary
abstract  void _assert(boolean cond)
          Checks that the given condition is true.
abstract  void _assert(boolean cond, String message)
          Checks that the given condition is true.
abstract  void dumpStack()
          Print a stack trace
abstract  void fail(String message)
          Logs a message and traceback, then exits.
protected abstract  boolean getVerifyAssertionsConstant()
           
(package private) static boolean verifyAssertionsTrapdoor(Assert a)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Assert

public Assert()
Method Detail

fail

public abstract void fail(String message)
Logs a message and traceback, then exits.

Parameters:
message - the string to log

_assert

public abstract void _assert(boolean cond)
Checks that the given condition is true. If it is not, this method does a traceback and exits. All calls to this method must be guarded by VM.VERIFY_ASSERTIONS.

Parameters:
cond - the condition to be checked

_assert

public abstract void _assert(boolean cond,
                             String message)
Checks that the given condition is true. If it is not, this method prints a message, does a traceback and exits. All calls to this method must be guarded by VM.VERIFY_ASSERTIONS.

Parameters:
cond - the condition to be checked
message - the message to print

dumpStack

public abstract void dumpStack()
Print a stack trace


getVerifyAssertionsConstant

protected abstract boolean getVerifyAssertionsConstant()
Returns:
true if assertions should be verified

verifyAssertionsTrapdoor

static boolean verifyAssertionsTrapdoor(Assert a)