KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > mirror > apt > Messager


1 /*
2  * @(#)Messager.java 1.2 04/07/27
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.mirror.apt;
9
10
11 import com.sun.mirror.util.SourcePosition;
12
13
14 /**
15  * A <tt>Messager</tt> provides the way for
16  * an annotation processor to report error messages, warnings, and
17  * other notices.
18  *
19  * @author Joseph D. Darcy
20  * @author Scott Seligman
21  * @version 1.2 04/07/27
22  * @since 1.5
23  */

24
25 public interface Messager {
26
27     /**
28      * Prints an error message.
29      * Equivalent to <tt>printError(null, msg)</tt>.
30      * @param msg the message, or an empty string if none
31      */

32     void printError(String JavaDoc msg);
33
34     /**
35      * Prints an error message.
36      * @param pos the position where the error occured, or null if it is
37      * unknown or not applicable
38      * @param msg the message, or an empty string if none
39      */

40     void printError(SourcePosition pos, String JavaDoc msg);
41
42     /**
43      * Prints a warning message.
44      * Equivalent to <tt>printWarning(null, msg)</tt>.
45      * @param msg the message, or an empty string if none
46      */

47     void printWarning(String JavaDoc msg);
48
49     /**
50      * Prints a warning message.
51      * @param pos the position where the warning occured, or null if it is
52      * unknown or not applicable
53      * @param msg the message, or an empty string if none
54      */

55     void printWarning(SourcePosition pos, String JavaDoc msg);
56
57     /**
58      * Prints a notice.
59      * Equivalent to <tt>printNotice(null, msg)</tt>.
60      * @param msg the message, or an empty string if none
61      */

62     void printNotice(String JavaDoc msg);
63
64     /**
65      * Prints a notice.
66      * @param pos the position where the noticed occured, or null if it is
67      * unknown or not applicable
68      * @param msg the message, or an empty string if none
69      */

70     void printNotice(SourcePosition pos, String JavaDoc msg);
71 }
72
Popular Tags