/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* Utility for integrating with javadoc tools and for localization.
* Handle Resources. Access to error and warning counts.
* Message formatting.
* <br>
* Also provides implementation for DocErrorReporter.
*
* @see java.util.ResourceBundle
* @see java.text.MessageFormat
* @author Neal Gafter (rewrite)
*/
/** Get the current messager, which is also the compiler log. */
throw new InternalError("no messager instance!");
}
final String programName) {
return new Messager(c,
}
});
}
final String programName,
final PrintWriter errWriter,
final PrintWriter warnWriter,
final PrintWriter noticeWriter) {
return new Messager(c,
}
});
}
}
/** The default writer for diagnostics
*/
/**
* Constructor
* @param programName Name of the program (for error messages).
*/
}
/**
* Constructor
* @param programName Name of the program (for error messages).
* @param errWriter Stream for error messages
* @param warnWriter Stream for warnings
* @param noticeWriter Stream for other messages
*/
@SuppressWarnings("deprecation")
this.programName = programName;
}
protected int getDefaultMaxErrors() {
}
protected int getDefaultMaxWarnings() {
}
/**
* Reset resource bundle, eg. locale has changed.
*/
public void reset() {
}
/**
* Get string from ResourceBundle, initialize ResourceBundle
* if needed.
*/
try {
} catch (MissingResourceException e) {
throw new Error("Fatal: Resource for javadoc is missing");
}
}
}
/**
* get and format message string from resource
*
* @param key selects message from resource
*/
}
/**
* get and format message string from resource
*
* @param key selects message from resource
* @param a1 first argument
*/
}
/**
* get and format message string from resource
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
}
/**
* get and format message string from resource
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
}
/**
* get and format message string from resource
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
* @param a4 fourth argument
*/
try {
} catch (MissingResourceException e) {
return "********** Resource for javadoc is broken. There is no " +
key + " key in resource.";
}
}
/**
* Print error message, increment error count.
* Part of DocErrorReporter.
*
* @param msg message to print
*/
}
/**
* Print error message, increment error count.
* Part of DocErrorReporter.
*
* @param pos the position where the error occurs
* @param msg message to print
*/
prompt();
nerrors++;
}
}
/**
* Print warning message, increment warning count.
* Part of DocErrorReporter.
*
* @param msg message to print
*/
}
/**
* Print warning message, increment warning count.
* Part of DocErrorReporter.
*
* @param pos the position where the error occurs
* @param msg message to print
*/
if (nwarnings < MaxWarnings) {
warnWriter.flush();
nwarnings++;
}
}
/**
* Print a message.
* Part of DocErrorReporter.
*
* @param msg message to print
*/
}
/**
* Print a message.
* Part of DocErrorReporter.
*
* @param pos the position where the error occurs
* @param msg message to print
*/
else
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
*/
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
*/
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
}
/**
* Print error message, increment error count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
*/
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
*/
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
}
/**
* Print warning message, increment warning count.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
}
/**
* Print a message.
*
* @param key selects message from resource
*/
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
*/
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
*/
}
/**
* Print a message.
*
* @param key selects message from resource
* @param a1 first argument
* @param a2 second argument
* @param a3 third argument
*/
}
/**
* Return total number of errors, including those recorded
* in the compilation log.
*/
/**
* Return total number of warnings, including those recorded
* in the compilation log.
*/
/**
* Print exit message.
*/
public void exitNotice() {
if (nerrors > 0) {
"" + nerrors);
}
if (nwarnings > 0) {
"" + nwarnings);
}
}
/**
* Force program exit, e.g., from a fatal error.
* <p>
* TODO: This method does not really belong here.
*/
public void exit() {
throw new ExitJavadoc();
}
}