code: protected void addModifiers(Element member, Content htmltree) {
          Set<Modifier> set = new TreeSet<>(member.getModifiers());
  
          // remove the ones we really don't need
          set.remove(NATIVE);
          set.remove(SYNCHRONIZED);
          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 AnnotationTypeWriterImpl) )) {
              // Remove the implicit abstract and public modifiers
              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);
              }
          }
          if (!set.isEmpty()) {
              String mods = set.stream().map(Modifier::toString).collect(Collectors.joining(" "));
              htmltree.addContent(mods);
              htmltree.addContent(Contents.SPACE);
          }
      }
docs: Add the modifier for the member. The modifiers are ordered as specified
  by <em>The Java Language Specification</em>.
  
  @param member the member for which teh modifier will be added.
  @param htmltree the content tree to which the modifier information will be added.