KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > ubik > util > Debug


1 package org.sapia.ubik.util;
2
3 import java.io.PrintStream JavaDoc;
4
5 /**
6  * This interface defines basic debugging behavior.
7  *
8  * @author Yanick Duchesne
9  *
10  * <dl>
11  * <dt><b>Copyright:</b><dd>Copyright &#169; 2002-2005 <a HREF="http://www.sapia-oss.org">Sapia Open Source Software</a>. All Rights Reserved.</dd></dt>
12  * <dt><b>License:</b><dd>Read the license.txt file of the jar or visit the
13  * <a HREF="http://www.sapia-oss.org/license.html">license page</a> at the Sapia OSS web site</dd></dt>
14  * </dl>
15  */

16 public interface Debug {
17
18   /**
19    * Outputs the given message, originating from an instance of
20    * the given class.
21    *
22    * @param caller the <code>Class</code> from which the call is made.
23    * @param msg the message to output.
24    */

25   public void out(Class JavaDoc caller, String JavaDoc msg);
26   
27   /**
28    * Outputs the given message and error, originating from an instance of
29    * the given class.
30    *
31    * @param caller the <code>Class</code> from which the call is made.
32    * @param msg the message to output.
33    * @param err a <code>Throwable</code>.
34    */

35   public void out(Class JavaDoc caller, String JavaDoc msg, Throwable JavaDoc err);
36   
37   /**
38    * @return the <code>PrintStream</code> this is used to perform the output.
39    */

40   public PrintStream JavaDoc out();
41   
42   /**
43    * @return <code>true</code> if debugging is on.
44    */

45   public boolean on();
46   
47   /**
48    * @param on <code>true</code> if debugging should be turned on,
49    * false otherwise.
50    */

51   public void on(boolean on);
52
53 }
54
Popular Tags