138 */ |
138 */ |
139 public AnnotationDesc[] annotations() { |
139 public AnnotationDesc[] annotations() { |
140 if (!type.isAnnotated()) { |
140 if (!type.isAnnotated()) { |
141 return new AnnotationDesc[0]; |
141 return new AnnotationDesc[0]; |
142 } |
142 } |
143 List<TypeCompound> tas = ((com.sun.tools.javac.code.Type.AnnotatedType) type).typeAnnotations; |
143 List<? extends TypeCompound> tas = type.getAnnotationMirrors(); |
144 AnnotationDesc res[] = new AnnotationDesc[tas.length()]; |
144 AnnotationDesc res[] = new AnnotationDesc[tas.length()]; |
145 int i = 0; |
145 int i = 0; |
146 for (Attribute.Compound a : tas) { |
146 for (Attribute.Compound a : tas) { |
147 res[i++] = new AnnotationDescImpl(env, a); |
147 res[i++] = new AnnotationDescImpl(env, a); |
148 } |
148 } |