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

changeset 1992
23f0f3c9c44a
parent 1521
71f35e4b93a5
child 2525
2eb010b6cb22
equal deleted inserted replaced
1988:96b6865eda94 1992:23f0f3c9c44a
38 * @since 1.8 38 * @since 1.8
39 */ 39 */
40 public class AnnotatedTypeImpl 40 public class AnnotatedTypeImpl
41 extends AbstractTypeImpl implements AnnotatedType { 41 extends AbstractTypeImpl implements AnnotatedType {
42 42
43 AnnotatedTypeImpl(DocEnv env, com.sun.tools.javac.code.Type.AnnotatedType type) { 43 AnnotatedTypeImpl(DocEnv env, com.sun.tools.javac.code.Type type) {
44 super(env, type); 44 super(env, type);
45 } 45 }
46 46
47 /** 47 /**
48 * Get the annotations of this program element. 48 * Get the annotations of this program element.
49 * Return an empty array if there are none. 49 * Return an empty array if there are none.
50 */ 50 */
51 @Override 51 @Override
52 public AnnotationDesc[] annotations() { 52 public AnnotationDesc[] annotations() {
53 List<TypeCompound> tas = ((com.sun.tools.javac.code.Type.AnnotatedType)type).typeAnnotations; 53 List<? extends TypeCompound> tas = type.getAnnotationMirrors();
54 if (tas == null || 54 if (tas == null ||
55 tas.isEmpty()) { 55 tas.isEmpty()) {
56 return new AnnotationDesc[0]; 56 return new AnnotationDesc[0];
57 } 57 }
58 AnnotationDesc res[] = new AnnotationDesc[tas.length()]; 58 AnnotationDesc res[] = new AnnotationDesc[tas.length()];
63 return res; 63 return res;
64 } 64 }
65 65
66 @Override 66 @Override
67 public com.sun.javadoc.Type underlyingType() { 67 public com.sun.javadoc.Type underlyingType() {
68 return TypeMaker.getType(env, ((com.sun.tools.javac.code.Type.AnnotatedType)type).underlyingType, true, false); 68 return TypeMaker.getType(env, type.unannotatedType(), true, false);
69 } 69 }
70 70
71 @Override 71 @Override
72 public AnnotatedType asAnnotatedType() { 72 public AnnotatedType asAnnotatedType() {
73 return this; 73 return this;

mercurial