< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java

Print this page

        

@@ -259,14 +259,17 @@
         set.remove(STRICTFP);
 
         // According to JLS, we should not be showing public modifier for
         // interface methods.
         if ((utils.isField(member) || utils.isMethod(member))
-                && writer instanceof ClassWriterImpl
-                && utils.isInterface(((ClassWriterImpl) writer).getTypeElement())) {
+            && ((writer instanceof ClassWriterImpl
+                 && utils.isInterface(((ClassWriterImpl) writer).getTypeElement())  ||
+                 writer instanceof AnnotationTypeWriterImpl) )) {
             // Remove the implicit abstract and public modifiers
-            if (utils.isMethod(member) && utils.isInterface(member.getEnclosingElement())) {
+            if (utils.isMethod(member) &&
+                (utils.isInterface(member.getEnclosingElement()) ||
+                 utils.isAnnotationType(member.getEnclosingElement()))) {
                 set.remove(ABSTRACT);
                 set.remove(PUBLIC);
             }
             if (!utils.isMethod(member)) {
                 set.remove(PUBLIC);
< prev index next >