1 18 19 20 package org.objectweb.speedo.generation.start; 21 22 25 public class Assertion { 26 27 static protected final void assertion(boolean condition) { 28 if (!condition) 29 throw new InternalError ("assertion failed."); 30 } 31 32 static protected final void assertion(boolean condition, String msg) { 33 if (!condition) 34 throw new InternalError ("assertion failed: " + msg); 35 } 36 37 static protected final void assertion(Object object) { 38 if (object == null) 39 throw new InternalError ("assertion failed."); 40 } 41 42 static protected final void assertion(Object object, String msg) { 43 if (object == null) 44 throw new InternalError ("assertion failed: " + msg); 45 } 46 } 47 | Popular Tags |