src/jdk.compiler/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java
changeset 58713 ad69fd32778e
parent 55495 badfa812b82a
equal deleted inserted replaced
58712:14e098407bb0 58713:ad69fd32778e
   184     }
   184     }
   185 
   185 
   186     /**
   186     /**
   187      * The log to which to report warnings.
   187      * The log to which to report warnings.
   188      */
   188      */
   189     private Log log;
   189     private final Log log;
   190 
   190 
   191     /**
   191     /**
   192      * Whether or not to report individual warnings, or simply to report a
   192      * Whether or not to report individual warnings, or simply to report a
   193      * single aggregate warning at the end of the compilation.
   193      * single aggregate warning at the end of the compilation.
   194      */
   194      */
   195     private boolean verbose;
   195     private final boolean verbose;
   196 
   196 
   197     /**
   197     /**
   198      * The common prefix for all I18N message keys generated by this handler.
   198      * The common prefix for all I18N message keys generated by this handler.
   199      */
   199      */
   200     private String prefix;
   200     private final String prefix;
   201 
   201 
   202     /**
   202     /**
   203      * A set containing the names of the source files for which specific
   203      * A set containing the names of the source files for which specific
   204      * warnings have been generated -- i.e. in verbose mode.  If a source name
   204      * warnings have been generated -- i.e. in verbose mode.  If a source name
   205      * appears in this list, then deferred diagnostics will be phrased to
   205      * appears in this list, then deferred diagnostics will be phrased to
   260         if (enforceMandatory)
   260         if (enforceMandatory)
   261             log.mandatoryNote(file, new Note("compiler", msg, args));
   261             log.mandatoryNote(file, new Note("compiler", msg, args));
   262         else
   262         else
   263             log.note(file, new Note("compiler", msg, args));
   263             log.note(file, new Note("compiler", msg, args));
   264     }
   264     }
       
   265 
       
   266     public void clear() {
       
   267         sourcesWithReportedWarnings = null;
       
   268         deferredDiagnosticKind = null;
       
   269         deferredDiagnosticSource = null;
       
   270         deferredDiagnosticArg = null;
       
   271     }
   265 }
   272 }