src/share/classes/com/sun/tools/javac/model/JavacElements.java
Print this page
*** 400,410 ****
--- 400,417 ----
* inherited or directly present.
*
* @param e the element being examined
* @return all annotations of the element
*/
+ @SuppressWarnings("unchecked")
public List<Attribute.Compound> getAllAnnotationMirrors(Element e) {
+ // HACK!!
+ if (e.getKind() == ElementKind.TYPE_PARAMETER) {
+ // No inheritance for type parameters
+ return (List<Attribute.Compound>)e.getAnnotationMirrors();
+ }
+
Symbol sym = cast(Symbol.class, e);
List<Attribute.Compound> annos = sym.getRawAttributes();
while (sym.getKind() == ElementKind.CLASS) {
Type sup = ((ClassSymbol) sym).getSuperclass();
if (!sup.hasTag(CLASS) || sup.isErroneous() ||