org.jikesrvm.mm.mmtk
Class Assert

java.lang.Object
  extended by org.mmtk.vm.Assert
      extended by org.jikesrvm.mm.mmtk.Assert

public class Assert
extends Assert


Constructor Summary
Assert()
           
 
Method Summary
 void _assert(boolean cond)
          Checks that the given condition is true.
 void _assert(boolean cond, String message)
          Checks that the given condition is true.
 void dumpStack()
          Print a stack trace
 void error(String str)
          This method should be called whenever an error is encountered.
 void exit(int rc)
           
 void fail(String message)
          Logs a message and traceback, then exits.
protected  boolean getVerifyAssertionsConstant()
           
 
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

getVerifyAssertionsConstant

protected final boolean getVerifyAssertionsConstant()
Specified by:
getVerifyAssertionsConstant in class Assert
Returns:
true if assertions should be verified

error

public final void error(String str)
This method should be called whenever an error is encountered.

Parameters:
str - A string describing the error condition.

fail

public final void fail(String message)
Description copied from class: Assert
Logs a message and traceback, then exits.

Specified by:
fail in class Assert
Parameters:
message - the string to log

exit

public final void exit(int rc)

_assert

public final void _assert(boolean cond)
Description copied from class: Assert
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.

Specified by:
_assert in class Assert
Parameters:
cond - the condition to be checked

_assert

public final void _assert(boolean cond,
                          String message)
Description copied from class: Assert
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.

Specified by:
_assert in class Assert
Parameters:
cond - the condition to be checked
message - the message to print

dumpStack

public final void dumpStack()
Description copied from class: Assert
Print a stack trace

Specified by:
dumpStack in class Assert