01: /* D.java
02:
03: {{IS_NOTE
04:
05: Purpose: Debugging utilities
06: Description:
07: History:
08: 2001/5/17, Tom M. Yeh: Created.
09:
10: }}IS_NOTE
11:
12: Copyright (C) 2001 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.lang;
20:
21: /**
22: * Debugging utilities.
23: *
24: * <p>Because Java has no preprocessor, we have to make the debugging
25: * codes being able to removed by testing D.ON or D.OFF first.<br>
26: * For example,
27: *
28: * <p>if (D.ON) your_test_codes;
29: *
30: * @author tomyeh
31: */
32: public class D {
33: /**
34: * Denotes whether the debugging is ON.
35: * If ON is true, the debugging is turned on. Otherwise, it is turned off.
36: *
37: * <p>NOTE: don't modify the definition manually. It is done
38: * automatically by bin/setdbg
39: */
40: public static final boolean /*-*/ON = true/*-*/; //don't modify this line
41: /**
42: * Denotes whether the debugging is OFF.
43: */
44: public static final boolean OFF = !ON;
45: }
|