langtools/src/share/classes/com/sun/tools/javac/util/Log.java
changeset 2085 4792e12a8ca2
parent 1866 734286a0cc38
child 2212 1d3dc0e0ba0c
equal deleted inserted replaced
1998:29b961506419 2085:4792e12a8ca2
    91      * interface to javac (JSR 199).
    91      * interface to javac (JSR 199).
    92      */
    92      */
    93     protected DiagnosticListener<? super JavaFileObject> diagListener;
    93     protected DiagnosticListener<? super JavaFileObject> diagListener;
    94 
    94 
    95     /**
    95     /**
    96      * Formatter for diagnostics
    96      * Formatter for diagnostics.
    97      */
    97      */
    98     private DiagnosticFormatter<JCDiagnostic> diagFormatter;
    98     private DiagnosticFormatter<JCDiagnostic> diagFormatter;
    99 
    99 
   100     /**
   100     /**
   101      * Keys for expected diagnostics
   101      * Keys for expected diagnostics.
   102      */
   102      */
   103     public Set<String> expectDiagKeys;
   103     public Set<String> expectDiagKeys;
   104 
   104 
   105     /**
   105     /**
   106      * JavacMessages object used for localization
   106      * JavacMessages object used for localization.
   107      */
   107      */
   108     private JavacMessages messages;
   108     private JavacMessages messages;
   109 
   109 
   110     /** Construct a log with given I/O redirections.
   110     /** Construct a log with given I/O redirections.
   111      */
   111      */
   202 
   202 
   203     /** Return current sourcefile.
   203     /** Return current sourcefile.
   204      */
   204      */
   205     public JavaFileObject currentSourceFile() {
   205     public JavaFileObject currentSourceFile() {
   206         return source == null ? null : source.getFile();
   206         return source == null ? null : source.getFile();
       
   207     }
       
   208 
       
   209     /** Get the current diagnostic formatter.
       
   210      */
       
   211     public DiagnosticFormatter<JCDiagnostic> getDiagnosticFormatter() {
       
   212         return diagFormatter;
       
   213     }
       
   214 
       
   215     /** Set the current diagnostic formatter.
       
   216      */
       
   217     public void setDiagnosticFormatter(DiagnosticFormatter<JCDiagnostic> diagFormatter) {
       
   218         this.diagFormatter = diagFormatter;
   207     }
   219     }
   208 
   220 
   209     /** Flush the logs
   221     /** Flush the logs
   210      */
   222      */
   211     public void flush() {
   223     public void flush() {