src/share/classes/com/sun/tools/javac/util/Log.java

changeset 1159
4261dc8af622
parent 1157
3809292620c9
child 1280
5c0b3faeb0b0
equal deleted inserted replaced
1158:4e4fed1d02f9 1159:4261dc8af622
133 public boolean deferDiagnostics; 133 public boolean deferDiagnostics;
134 public Queue<JCDiagnostic> deferredDiagnostics = new ListBuffer<JCDiagnostic>(); 134 public Queue<JCDiagnostic> deferredDiagnostics = new ListBuffer<JCDiagnostic>();
135 135
136 /** Construct a log with given I/O redirections. 136 /** Construct a log with given I/O redirections.
137 */ 137 */
138 @Deprecated
139 protected Log(Context context, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) { 138 protected Log(Context context, PrintWriter errWriter, PrintWriter warnWriter, PrintWriter noticeWriter) {
140 super(JCDiagnostic.Factory.instance(context)); 139 super(JCDiagnostic.Factory.instance(context));
141 context.put(logKey, this); 140 context.put(logKey, this);
142 this.errWriter = errWriter; 141 this.errWriter = errWriter;
143 this.warnWriter = warnWriter; 142 this.warnWriter = warnWriter;
292 } 291 }
293 292
294 public void setWriters(PrintWriter pw) { 293 public void setWriters(PrintWriter pw) {
295 pw.getClass(); 294 pw.getClass();
296 noticeWriter = warnWriter = errWriter = pw; 295 noticeWriter = warnWriter = errWriter = pw;
296 }
297
298 public void setWriters(Log other) {
299 this.noticeWriter = other.noticeWriter;
300 this.warnWriter = other.warnWriter;
301 this.errWriter = other.errWriter;
297 } 302 }
298 303
299 /** Flush the logs 304 /** Flush the logs
300 */ 305 */
301 public void flush() { 306 public void flush() {

mercurial