| java.lang.Object com.sun.tools.javac.util.Log com.sun.tools.javadoc.Messager
Messager | public class Messager extends Log implements DocErrorReporter(Code) | | Utility for integrating with javadoc tools and for localization.
Handle Resources. Access to error and warning counts.
Message formatting.
Also provides implementation for DocErrorReporter.
See Also: java.util.ResourceBundle See Also: java.text.MessageFormat author: Neal Gafter (rewrite) |
Inner Class :public class ExitJavadoc extends Error | |
Method Summary | |
public void | error(SourcePosition pos, String key) Print error message, increment error count. | public void | error(SourcePosition pos, String key, String a1) Print error message, increment error count. | public void | error(SourcePosition pos, String key, String a1, String a2) Print error message, increment error count. | public void | error(SourcePosition pos, String key, String a1, String a2, String a3) Print error message, increment error count. | public void | exit() Force program exit, e.g., from a fatal error. | public void | exitNotice() Print exit message. | String | getText(String key) | String | getText(String key, String a1) | String | getText(String key, String a1, String a2) | String | getText(String key, String a1, String a2, String a3) | String | getText(String key, String a1, String a2, String a3, String a4) | public static Messager | instance0(Context context) Get the current messager, which is also the compiler log. | public int | nerrors() Return total number of errors, including those recorded
in the compilation log. | public void | notice(String key) Print a message. | public void | notice(String key, String a1) Print a message. | public void | notice(String key, String a1, String a2) Print a message. | public void | notice(String key, String a1, String a2, String a3) Print a message. | public int | nwarnings() Return total number of warnings, including those recorded
in the compilation log. | public static void | preRegister(Context context, String programName) | public static void | preRegister(Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) | public void | printError(String msg) Print error message, increment error count. | public void | printError(SourcePosition pos, String msg) Print error message, increment error count. | public void | printNotice(String msg) Print a message. | public void | printNotice(SourcePosition pos, String msg) Print a message. | public void | printWarning(String msg) Print warning message, increment warning count. | public void | printWarning(SourcePosition pos, String msg) Print warning message, increment warning count. | public void | reset() Reset resource bundle, eg. | public void | warning(SourcePosition pos, String key) Print warning message, increment warning count. | public void | warning(SourcePosition pos, String key, String a1) Print warning message, increment warning count. | public void | warning(SourcePosition pos, String key, String a1, String a2) Print warning message, increment warning count. | public void | warning(SourcePosition pos, String key, String a1, String a2, String a3) Print warning message, increment warning count. | public void | warning(SourcePosition pos, String key, String a1, String a2, String a3, String a4) Print warning message, increment warning count. |
defaultErrWriter | final static PrintWriter defaultErrWriter(Code) | | The default writer for diagnostics
|
Messager | protected Messager(Context context, String programName)(Code) | | Constructor
Parameters: programName - Name of the program (for error messages). |
Messager | protected Messager(Context context, String programName, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter)(Code) | | Constructor
Parameters: programName - Name of the program (for error messages). Parameters: errWriter - Stream for error messages Parameters: warnWriter - Stream for warnings Parameters: noticeWriter - Stream for other messages |
error | public void error(SourcePosition pos, String key)(Code) | | Print error message, increment error count.
Parameters: key - selects message from resource |
error | public void error(SourcePosition pos, String key, String a1)(Code) | | Print error message, increment error count.
Parameters: key - selects message from resource Parameters: a1 - first argument |
error | public void error(SourcePosition pos, String key, String a1, String a2)(Code) | | Print error message, increment error count.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument |
error | public void error(SourcePosition pos, String key, String a1, String a2, String a3)(Code) | | Print error message, increment error count.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument |
exit | public void exit()(Code) | | Force program exit, e.g., from a fatal error.
TODO: This method does not really belong here.
|
exitNotice | public void exitNotice()(Code) | | Print exit message.
|
getText | String getText(String key)(Code) | | get and format message string from resource
Parameters: key - selects message from resource |
getText | String getText(String key, String a1)(Code) | | get and format message string from resource
Parameters: key - selects message from resource Parameters: a1 - first argument |
getText | String getText(String key, String a1, String a2)(Code) | | get and format message string from resource
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument |
getText | String getText(String key, String a1, String a2, String a3)(Code) | | get and format message string from resource
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument |
getText | String getText(String key, String a1, String a2, String a3, String a4)(Code) | | get and format message string from resource
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument Parameters: a4 - fourth argument |
instance0 | public static Messager instance0(Context context)(Code) | | Get the current messager, which is also the compiler log.
|
nerrors | public int nerrors()(Code) | | Return total number of errors, including those recorded
in the compilation log.
|
notice | public void notice(String key)(Code) | | Print a message.
Parameters: key - selects message from resource |
notice | public void notice(String key, String a1)(Code) | | Print a message.
Parameters: key - selects message from resource Parameters: a1 - first argument |
notice | public void notice(String key, String a1, String a2)(Code) | | Print a message.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument |
notice | public void notice(String key, String a1, String a2, String a3)(Code) | | Print a message.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument |
nwarnings | public int nwarnings()(Code) | | Return total number of warnings, including those recorded
in the compilation log.
|
printError | public void printError(String msg)(Code) | | Print error message, increment error count.
Part of DocErrorReporter.
Parameters: msg - message to print |
printError | public void printError(SourcePosition pos, String msg)(Code) | | Print error message, increment error count.
Part of DocErrorReporter.
Parameters: pos - the position where the error occurs Parameters: msg - message to print |
printNotice | public void printNotice(String msg)(Code) | | Print a message.
Part of DocErrorReporter.
Parameters: msg - message to print |
printNotice | public void printNotice(SourcePosition pos, String msg)(Code) | | Print a message.
Part of DocErrorReporter.
Parameters: pos - the position where the error occurs Parameters: msg - message to print |
printWarning | public void printWarning(String msg)(Code) | | Print warning message, increment warning count.
Part of DocErrorReporter.
Parameters: msg - message to print |
printWarning | public void printWarning(SourcePosition pos, String msg)(Code) | | Print warning message, increment warning count.
Part of DocErrorReporter.
Parameters: pos - the position where the error occurs Parameters: msg - message to print |
reset | public void reset()(Code) | | Reset resource bundle, eg. locale has changed.
|
warning | public void warning(SourcePosition pos, String key)(Code) | | Print warning message, increment warning count.
Parameters: key - selects message from resource |
warning | public void warning(SourcePosition pos, String key, String a1)(Code) | | Print warning message, increment warning count.
Parameters: key - selects message from resource Parameters: a1 - first argument |
warning | public void warning(SourcePosition pos, String key, String a1, String a2)(Code) | | Print warning message, increment warning count.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument |
warning | public void warning(SourcePosition pos, String key, String a1, String a2, String a3)(Code) | | Print warning message, increment warning count.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument |
warning | public void warning(SourcePosition pos, String key, String a1, String a2, String a3, String a4)(Code) | | Print warning message, increment warning count.
Parameters: key - selects message from resource Parameters: a1 - first argument Parameters: a2 - second argument Parameters: a3 - third argument |
Methods inherited from com.sun.tools.javac.util.Log | public JavaFileObject currentSource()(Code)(Java Doc) public void error(String key, Object... args)(Code)(Java Doc) public void error(DiagnosticPosition pos, String key, Object... args)(Code)(Java Doc) public void error(int pos, String key, Object... args)(Code)(Java Doc) public void flush()(Code)(Java Doc) public static String format(String fmt, Object... args)(Code)(Java Doc) protected char[] getBuf()(Code)(Java Doc) protected static char[] getCharContent(JavaFileObject fileObject) throws IOException(Code)(Java Doc) protected int getColumnNumber(int pos)(Code)(Java Doc) protected int getLineNumber(int pos)(Code)(Java Doc) public static String getLocalizedString(String key, Object... args)(Code)(Java Doc) protected PrintWriter getWriterForDiagnosticType(DiagnosticType dt)(Code)(Java Doc) public boolean hasDiagnosticListener()(Code)(Java Doc) public static Log instance(Context context)(Code)(Java Doc) public void mandatoryNote(JavaFileObject file, String key, Object... args)(Code)(Java Doc) public void mandatoryWarning(DiagnosticPosition pos, String key, Object... args)(Code)(Java Doc) public void note(String key, Object... args)(Code)(Java Doc) public void note(DiagnosticPosition pos, String key, Object... args)(Code)(Java Doc) public void note(int pos, String key, Object... args)(Code)(Java Doc) public static void printLines(PrintWriter writer, String msg)(Code)(Java Doc) public void prompt()(Code)(Java Doc) public void rawError(int pos, String msg)(Code)(Java Doc) public void rawWarning(int pos, String msg)(Code)(Java Doc) public void report(JCDiagnostic diagnostic)(Code)(Java Doc) protected void setBuf(char[] newBuf)(Code)(Java Doc) public void setEndPosTable(JavaFileObject name, Map<JCTree, Integer> table)(Code)(Java Doc) protected boolean shouldReport(JavaFileObject file, int pos)(Code)(Java Doc) public void strictWarning(DiagnosticPosition pos, String key, Object... args)(Code)(Java Doc) public JavaFileObject useSource(JavaFileObject name)(Code)(Java Doc) public void warning(String key, Object... args)(Code)(Java Doc) public void warning(DiagnosticPosition pos, String key, Object... args)(Code)(Java Doc) public void warning(int pos, String key, Object... args)(Code)(Java Doc) protected void writeDiagnostic(JCDiagnostic diag)(Code)(Java Doc)
|
|
|