1 package com.versant.core.common; 2 3 import java.io.PrintStream ; 4 5 11 public final class Debug { 12 13 public Debug() {} 14 15 public static final String BUILD_DATE = "1118527200000"; 16 public static final String VERSION = "4.0.0beta4"; 17 18 public static final PrintStream OUT = System.out; 19 public static final PrintStream ERR = System.err; 20 21 public static final boolean DEBUG = false; 22 23 public static final void assertRuntime(boolean _assert, String message) { 24 if (!_assert) { 25 throw BindingSupportImpl.getInstance().runtime(message); 26 } 27 } 28 29 public static final void assertFatal(boolean _assert, String message) { 30 if (!_assert) { 31 throw BindingSupportImpl.getInstance().fatal(message); 32 } 33 } 34 35 public static final void assertInternal(boolean _assert, String message) { 36 if (!_assert) { 37 throw BindingSupportImpl.getInstance().internal(message); 38 } 39 } 40 41 public static final void assertSecurity(boolean _assert, String message) { 42 if (!_assert) { 43 throw BindingSupportImpl.getInstance().security(message); 44 } 45 } 46 47 public static final void assertIllegalArgument(boolean _assert, 48 String message) { 49 if (!_assert) { 50 throw BindingSupportImpl.getInstance().illegalArgument(message); 51 } 52 } 53 54 public static final void assertIndexOutOfBounds(boolean _assert, 55 String message) { 56 if (!_assert) { 57 throw BindingSupportImpl.getInstance().indexOutOfBounds(message); 58 } 59 } 60 61 public static final void assertInvalidOperation(boolean _assert, 62 String message) { 63 if (!_assert) { 64 throw BindingSupportImpl.getInstance().invalidOperation(message); 65 } 66 } 67 } 68 | Popular Tags |