src/share/classes/com/sun/tools/javadoc/ClassDocImpl.java

changeset 1374
c002fdee76fd
parent 1359
25e14ad23cef
child 1443
cfde9737131e
equal deleted inserted replaced
1373:4a1c57a1c410 1374:c002fdee76fd
43 import com.sun.tools.javac.code.Scope; 43 import com.sun.tools.javac.code.Scope;
44 import com.sun.tools.javac.code.Symbol; 44 import com.sun.tools.javac.code.Symbol;
45 import com.sun.tools.javac.code.Symbol.*; 45 import com.sun.tools.javac.code.Symbol.*;
46 import com.sun.tools.javac.code.Type; 46 import com.sun.tools.javac.code.Type;
47 import com.sun.tools.javac.code.Type.ClassType; 47 import com.sun.tools.javac.code.Type.ClassType;
48 import com.sun.tools.javac.code.TypeTags;
49 48
50 import com.sun.tools.javac.comp.AttrContext; 49 import com.sun.tools.javac.comp.AttrContext;
51 import com.sun.tools.javac.comp.Env; 50 import com.sun.tools.javac.comp.Env;
52 51
53 import com.sun.tools.javac.tree.JCTree; 52 import com.sun.tools.javac.tree.JCTree;
61 import com.sun.tools.javac.util.Name; 60 import com.sun.tools.javac.util.Name;
62 import com.sun.tools.javac.util.Names; 61 import com.sun.tools.javac.util.Names;
63 import com.sun.tools.javac.util.Position; 62 import com.sun.tools.javac.util.Position;
64 63
65 import static com.sun.tools.javac.code.Kinds.*; 64 import static com.sun.tools.javac.code.Kinds.*;
65 import static com.sun.tools.javac.code.TypeTag.CLASS;
66 import static com.sun.tools.javac.tree.JCTree.Tag.*; 66 import static com.sun.tools.javac.tree.JCTree.Tag.*;
67 67
68 /** 68 /**
69 * Represents a java class and provides access to information 69 * Represents a java class and provides access to information
70 * about the class, the class' comment and tags, and the 70 * about the class, the class' comment and tags, and the
162 @Override 162 @Override
163 public boolean isOrdinaryClass() { 163 public boolean isOrdinaryClass() {
164 if (isEnum() || isInterface() || isAnnotationType()) { 164 if (isEnum() || isInterface() || isAnnotationType()) {
165 return false; 165 return false;
166 } 166 }
167 for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { 167 for (Type t = type; t.hasTag(CLASS); t = env.types.supertype(t)) {
168 if (t.tsym == env.syms.errorType.tsym || 168 if (t.tsym == env.syms.errorType.tsym ||
169 t.tsym == env.syms.exceptionType.tsym) { 169 t.tsym == env.syms.exceptionType.tsym) {
170 return false; 170 return false;
171 } 171 }
172 } 172 }
199 @Override 199 @Override
200 public boolean isException() { 200 public boolean isException() {
201 if (isEnum() || isInterface() || isAnnotationType()) { 201 if (isEnum() || isInterface() || isAnnotationType()) {
202 return false; 202 return false;
203 } 203 }
204 for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { 204 for (Type t = type; t.hasTag(CLASS); t = env.types.supertype(t)) {
205 if (t.tsym == env.syms.exceptionType.tsym) { 205 if (t.tsym == env.syms.exceptionType.tsym) {
206 return true; 206 return true;
207 } 207 }
208 } 208 }
209 return false; 209 return false;
215 @Override 215 @Override
216 public boolean isError() { 216 public boolean isError() {
217 if (isEnum() || isInterface() || isAnnotationType()) { 217 if (isEnum() || isInterface() || isAnnotationType()) {
218 return false; 218 return false;
219 } 219 }
220 for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { 220 for (Type t = type; t.hasTag(CLASS); t = env.types.supertype(t)) {
221 if (t.tsym == env.syms.errorType.tsym) { 221 if (t.tsym == env.syms.errorType.tsym) {
222 return true; 222 return true;
223 } 223 }
224 } 224 }
225 return false; 225 return false;
230 */ 230 */
231 public boolean isThrowable() { 231 public boolean isThrowable() {
232 if (isEnum() || isInterface() || isAnnotationType()) { 232 if (isEnum() || isInterface() || isAnnotationType()) {
233 return false; 233 return false;
234 } 234 }
235 for (Type t = type; t.tag == TypeTags.CLASS; t = env.types.supertype(t)) { 235 for (Type t = type; t.hasTag(CLASS); t = env.types.supertype(t)) {
236 if (t.tsym == env.syms.throwableType.tsym) { 236 if (t.tsym == env.syms.throwableType.tsym) {
237 return true; 237 return true;
238 } 238 }
239 } 239 }
240 return false; 240 return false;

mercurial