1 23 24 25 package com.sun.jdo.api.persistence.enhancer.util; 26 27 30 public class Assertion { 32 static protected final void affirm(boolean condition) { 33 if (!condition) 34 throw new InternalError ("assertion failed."); } 36 37 static protected final void affirm(boolean condition, String msg) { 38 if (!condition) 39 throw new InternalError ("assertion failed: " + msg); } 41 42 static protected final void affirm(Object object) { 43 if (object == null) 44 throw new InternalError ("assertion failed."); } 46 47 static protected final void affirm(Object object, String msg) { 48 if (object == null) 49 throw new InternalError ("assertion failed: " + msg); } 51 } 52 | Popular Tags |