Jcontract API

jcontract
Class ExceptionRuntimeHandler

java.lang.Object
  |
  +--jcontract.RuntimeHandler
        |
        +--jcontract.ExceptionRuntimeHandler

public class ExceptionRuntimeHandler
extends RuntimeHandler

Simplest implementation of RuntimeHandler.
On contract violation in throws the ContractException that describes the contract being violated.


Constructor Summary
ExceptionRuntimeHandler()
           
 
Method Summary
 void contractViolation(java.lang.RuntimeException ex)
          Throws the ContractException that describes the contract being violated
 
Methods inherited from class jcontract.RuntimeHandler
documentedExceptionThrown, getRuntimeStatistics, instrumentedClassLoaded, shutdownAction, startAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExceptionRuntimeHandler

public ExceptionRuntimeHandler()
Method Detail

contractViolation

public void contractViolation(java.lang.RuntimeException ex)
Throws the ContractException that describes the contract being violated
Overrides:
contractViolation in class RuntimeHandler
Following copied from class: jcontract.RuntimeHandler
Parameters:
exception - the exception that describes the contract violated

Jcontract API