125 */ |
125 */ |
126 private static List<Type> getBounds(TypeVar v, DocEnv env) { |
126 private static List<Type> getBounds(TypeVar v, DocEnv env) { |
127 final Type upperBound = v.getUpperBound(); |
127 final Type upperBound = v.getUpperBound(); |
128 Name boundname = upperBound.tsym.getQualifiedName(); |
128 Name boundname = upperBound.tsym.getQualifiedName(); |
129 if (boundname == boundname.table.names.java_lang_Object |
129 if (boundname == boundname.table.names.java_lang_Object |
130 && upperBound.getKind() != TypeKind.ANNOTATED) { |
130 && !upperBound.isAnnotated()) { |
131 return List.nil(); |
131 return List.nil(); |
132 } else { |
132 } else { |
133 return env.types.getBounds(v); |
133 return env.types.getBounds(v); |
134 } |
134 } |
135 } |
135 } |
137 /** |
137 /** |
138 * Get the annotations of this program element. |
138 * Get the annotations of this program element. |
139 * Return an empty array if there are none. |
139 * Return an empty array if there are none. |
140 */ |
140 */ |
141 public AnnotationDesc[] annotations() { |
141 public AnnotationDesc[] annotations() { |
142 if (type.getKind() != TypeKind.ANNOTATED) { |
142 if (!type.isAnnotated()) { |
143 return new AnnotationDesc[0]; |
143 return new AnnotationDesc[0]; |
144 } |
144 } |
145 List<TypeCompound> tas = ((com.sun.tools.javac.code.Type.AnnotatedType) type).typeAnnotations; |
145 List<TypeCompound> tas = ((com.sun.tools.javac.code.Type.AnnotatedType) type).typeAnnotations; |
146 AnnotationDesc res[] = new AnnotationDesc[tas.length()]; |
146 AnnotationDesc res[] = new AnnotationDesc[tas.length()]; |
147 int i = 0; |
147 int i = 0; |