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

changeset 1521
71f35e4b93a5
parent 1406
2901c7b5339e
child 1613
d2a98dde7ecc
equal deleted inserted replaced
1520:5c956be64b9e 1521:71f35e4b93a5
1 /* 1 /*
2 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this 7 * published by the Free Software Foundation. Oracle designates this
215 * JavacMessages object used for localization. 215 * JavacMessages object used for localization.
216 */ 216 */
217 private JavacMessages messages; 217 private JavacMessages messages;
218 218
219 /** 219 /**
220 + * Handler for initial dispatch of diagnostics. 220 * Handler for initial dispatch of diagnostics.
221 */ 221 */
222 private DiagnosticHandler diagnosticHandler; 222 private DiagnosticHandler diagnosticHandler;
223 223
224 /** Construct a log with given I/O redirections. 224 /** Construct a log with given I/O redirections.
225 */ 225 */
383 public void setWriters(PrintWriter pw) { 383 public void setWriters(PrintWriter pw) {
384 pw.getClass(); 384 pw.getClass();
385 noticeWriter = warnWriter = errWriter = pw; 385 noticeWriter = warnWriter = errWriter = pw;
386 } 386 }
387 387
388 public void setWriters(Log other) { 388 /**
389 * Propagate the previous log's information.
390 */
391 public void initRound(Log other) {
389 this.noticeWriter = other.noticeWriter; 392 this.noticeWriter = other.noticeWriter;
390 this.warnWriter = other.warnWriter; 393 this.warnWriter = other.warnWriter;
391 this.errWriter = other.errWriter; 394 this.errWriter = other.errWriter;
392 }
393
394 public void setSourceMap(Log other) {
395 this.sourceMap = other.sourceMap; 395 this.sourceMap = other.sourceMap;
396 this.recorded = other.recorded;
397 this.nerrors = other.nerrors;
398 this.nwarnings = other.nwarnings;
396 } 399 }
397 400
398 /** 401 /**
399 * Replace the specified diagnostic handler with the 402 * Replace the specified diagnostic handler with the
400 * handler that was current at the time this handler was created. 403 * handler that was current at the time this handler was created.

mercurial