< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/Messages.java

Print this page




 115      * @param e an element identifying the declaration whose position should
 116      *  to be included with the message
 117      * @param key the name of a resource containing the message to be printed
 118      * @param args optional arguments to be replaced in the message.
 119      */
 120     public void warning(Element e, String key, Object... args) {
 121         if (configuration.showMessage(e, key)) {
 122             report(WARNING, e, resources.getText(key, args));
 123         }
 124     }
 125 
 126     // ***** Notices *****
 127 
 128     /**
 129      * Reports an informational notice to the doclet's reporter.
 130      *
 131      * @param key the name of a resource containing the message to be printed
 132      * @param args optional arguments to be replaced in the message.
 133      */
 134     public void notice(String key, Object... args) {
 135         if (!configuration.quiet) {
 136             report(NOTE, resources.getText(key, args));
 137         }
 138     }
 139 
 140     // ***** Internal support *****
 141 
 142     private void report(Diagnostic.Kind k, String msg) {
 143         initReporter();
 144         reporter.print(k, msg);
 145     }
 146 
 147     private void report(Diagnostic.Kind k, DocTreePath p, String msg) {
 148         initReporter();
 149         reporter.print(k, p, msg);
 150     }
 151 
 152     private void report(Diagnostic.Kind k, Element e, String msg) {
 153         initReporter();
 154         reporter.print(k, e, msg);
 155     }


 115      * @param e an element identifying the declaration whose position should
 116      *  to be included with the message
 117      * @param key the name of a resource containing the message to be printed
 118      * @param args optional arguments to be replaced in the message.
 119      */
 120     public void warning(Element e, String key, Object... args) {
 121         if (configuration.showMessage(e, key)) {
 122             report(WARNING, e, resources.getText(key, args));
 123         }
 124     }
 125 
 126     // ***** Notices *****
 127 
 128     /**
 129      * Reports an informational notice to the doclet's reporter.
 130      *
 131      * @param key the name of a resource containing the message to be printed
 132      * @param args optional arguments to be replaced in the message.
 133      */
 134     public void notice(String key, Object... args) {
 135         if (!configuration.getOptions().quiet) {
 136             report(NOTE, resources.getText(key, args));
 137         }
 138     }
 139 
 140     // ***** Internal support *****
 141 
 142     private void report(Diagnostic.Kind k, String msg) {
 143         initReporter();
 144         reporter.print(k, msg);
 145     }
 146 
 147     private void report(Diagnostic.Kind k, DocTreePath p, String msg) {
 148         initReporter();
 149         reporter.print(k, p, msg);
 150     }
 151 
 152     private void report(Diagnostic.Kind k, Element e, String msg) {
 153         initReporter();
 154         reporter.print(k, e, msg);
 155     }
< prev index next >