26 package com.sun.tools.javadoc; |
26 package com.sun.tools.javadoc; |
27 |
27 |
28 import com.sun.javadoc.*; |
28 import com.sun.javadoc.*; |
29 import com.sun.tools.javac.code.Symbol; |
29 import com.sun.tools.javac.code.Symbol; |
30 import com.sun.tools.javac.code.Symbol.ClassSymbol; |
30 import com.sun.tools.javac.code.Symbol.ClassSymbol; |
|
31 import com.sun.tools.javac.code.Symbol.CompletionFailure; |
31 import com.sun.tools.javac.code.Type; |
32 import com.sun.tools.javac.code.Type; |
32 import com.sun.tools.javac.code.Type.ArrayType; |
33 import com.sun.tools.javac.code.Type.ArrayType; |
33 import com.sun.tools.javac.code.Type.ClassType; |
34 import com.sun.tools.javac.code.Type.ClassType; |
34 import com.sun.tools.javac.code.Type.TypeVar; |
35 import com.sun.tools.javac.code.Type.TypeVar; |
35 import com.sun.tools.javac.util.List; |
36 import com.sun.tools.javac.util.List; |
54 public static com.sun.javadoc.Type getType(DocEnv env, Type t, |
55 public static com.sun.javadoc.Type getType(DocEnv env, Type t, |
55 boolean errorToClassDoc) { |
56 boolean errorToClassDoc) { |
56 return getType(env, t, errorToClassDoc, true); |
57 return getType(env, t, errorToClassDoc, true); |
57 } |
58 } |
58 |
59 |
|
60 public static com.sun.javadoc.Type getType(DocEnv env, Type t, |
|
61 boolean errToClassDoc, boolean considerAnnotations) { |
|
62 try { |
|
63 return getTypeImpl(env, t, errToClassDoc, considerAnnotations); |
|
64 } catch (CompletionFailure cf) { |
|
65 /* Quietly ignore completion failures and try again - the type |
|
66 * for which the CompletionFailure was thrown shouldn't be completed |
|
67 * again by the completer that threw the CompletionFailure. |
|
68 */ |
|
69 return getType(env, t, errToClassDoc, considerAnnotations); |
|
70 } |
|
71 } |
|
72 |
59 @SuppressWarnings("fallthrough") |
73 @SuppressWarnings("fallthrough") |
60 public static com.sun.javadoc.Type getType(DocEnv env, Type t, |
74 private static com.sun.javadoc.Type getTypeImpl(DocEnv env, Type t, |
61 boolean errToClassDoc, boolean considerAnnotations) { |
75 boolean errToClassDoc, boolean considerAnnotations) { |
62 if (env.legacyDoclet) { |
76 if (env.legacyDoclet) { |
63 t = env.types.erasure(t); |
77 t = env.types.erasure(t); |
64 } |
78 } |
65 |
79 |