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

changeset 1138
7375d4979bd3
parent 581
f2fdd52e4e87
child 1280
5c0b3faeb0b0
equal deleted inserted replaced
1137:c1238fcc9515 1138:7375d4979bd3
1 /* 1 /*
2 * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1999, 2011, 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
30 import java.nio.CharBuffer; 30 import java.nio.CharBuffer;
31 import java.util.Map; 31 import java.util.Map;
32 import javax.tools.JavaFileObject; 32 import javax.tools.JavaFileObject;
33 33
34 import com.sun.tools.javac.file.JavacFileManager; 34 import com.sun.tools.javac.file.JavacFileManager;
35 import com.sun.tools.javac.parser.EndPosTable;
35 import com.sun.tools.javac.tree.JCTree; 36 import com.sun.tools.javac.tree.JCTree;
36 37
37 import static com.sun.tools.javac.util.LayoutCharacters.*; 38 import static com.sun.tools.javac.util.LayoutCharacters.*;
38 39
39 /** 40 /**
126 } finally { 127 } finally {
127 buf = null; 128 buf = null;
128 } 129 }
129 } 130 }
130 131
131 public Map<JCTree, Integer> getEndPosTable() { 132 public EndPosTable getEndPosTable() {
132 return endPosTable; 133 return endPosTable;
133 } 134 }
134 135
135 public void setEndPosTable(Map<JCTree, Integer> t) { 136 public void setEndPosTable(EndPosTable t) {
136 if (endPosTable != null && endPosTable != t) 137 if (endPosTable != null && endPosTable != t)
137 throw new IllegalStateException("endPosTable already set"); 138 throw new IllegalStateException("endPosTable already set");
138 endPosTable = t; 139 endPosTable = t;
139 } 140 }
140 141
197 } 198 }
198 199
199 /** The underlying file object. */ 200 /** The underlying file object. */
200 protected JavaFileObject fileObject; 201 protected JavaFileObject fileObject;
201 202
202 protected Map<JCTree, Integer> endPosTable; 203 protected EndPosTable endPosTable;
203 204
204 /** A soft reference to the content of the file object. */ 205 /** A soft reference to the content of the file object. */
205 protected SoftReference<char[]> refBuf; 206 protected SoftReference<char[]> refBuf;
206 207
207 /** A temporary hard reference to the content of the file object. */ 208 /** A temporary hard reference to the content of the file object. */

mercurial