Skip to content
Permalink
Browse files
8242056: Merge support for AnnotationType builders/writers into suppo…
…rt for other types

Reviewed-by: hannesw
  • Loading branch information
jonathan-gibbons committed Apr 7, 2020
1 parent cceee2c commit 8523e37f7e3aebf50fb6ab592ace36b24042edc0
Show file tree
Hide file tree
Showing 22 changed files with 197 additions and 1,474 deletions.
@@ -626,21 +626,16 @@ private void appendModifiers(Content htmltree) {
set.remove(STRICTFP);

// According to JLS, we should not be showing public modifier for
// interface methods.
if ((utils.isField(element) || utils.isMethod(element))
&& ((writer instanceof ClassWriterImpl
&& utils.isInterface(((ClassWriterImpl) writer).getTypeElement()) ||
writer instanceof AnnotationTypeWriterImpl) )) {
// Remove the implicit abstract and public modifiers
if (utils.isMethod(element) &&
(utils.isInterface(element.getEnclosingElement()) ||
utils.isAnnotationType(element.getEnclosingElement()))) {
set.remove(ABSTRACT);
set.remove(PUBLIC);
}
if (!utils.isMethod(element)) {
set.remove(PUBLIC);
}
// interface methods and fields.
if ((utils.isField(element) || utils.isMethod(element))) {
Element te = element.getEnclosingElement();
if (utils.isInterface(te) || utils.isAnnotationType(te)) {
// Remove the implicit abstract and public modifiers
if (utils.isMethod(element)) {
set.remove(ABSTRACT);
}
set.remove(PUBLIC);
}
}
if (!set.isEmpty()) {
String mods = set.stream().map(Modifier::toString).collect(Collectors.joining(" "));

This file was deleted.

0 comments on commit 8523e37

Please sign in to comment.