1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Fri Dec 21 15:27:55 2012 +0000 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Tue Dec 25 17:23:59 2012 -0800 1.3 @@ -239,7 +239,14 @@ 1.4 if ((member.isField() || member.isMethod()) && 1.5 writer instanceof ClassWriterImpl && 1.6 ((ClassWriterImpl) writer).getClassDoc().isInterface()) { 1.7 - mod = Util.replaceText(mod, "public", "").trim(); 1.8 + // This check for isDefault() and the default modifier needs to be 1.9 + // added for it to appear on the method details section. Once the 1.10 + // default modifier is added to the Modifier list on DocEnv and once 1.11 + // it is updated to use the javax.lang.model.element.Modifier, we 1.12 + // will need to remove this. 1.13 + mod = (member.isMethod() && ((MethodDoc)member).isDefault()) ? 1.14 + Util.replaceText(mod, "public", "default").trim() : 1.15 + Util.replaceText(mod, "public", "").trim(); 1.16 } 1.17 if(mod.length() > 0) { 1.18 htmltree.addContent(mod); 1.19 @@ -313,8 +320,18 @@ 1.20 code.addContent(configuration.getText("doclet.Package_private")); 1.21 code.addContent(" "); 1.22 } 1.23 - if (member.isMethod() && ((MethodDoc)member).isAbstract()) { 1.24 - code.addContent("abstract "); 1.25 + if (member.isMethod()) { 1.26 + if (((MethodDoc)member).isAbstract()) { 1.27 + code.addContent("abstract "); 1.28 + } 1.29 + // This check for isDefault() and the default modifier needs to be 1.30 + // added for it to appear on the "Modifier and Type" column in the 1.31 + // method summary section. Once the default modifier is added 1.32 + // to the Modifier list on DocEnv and once it is updated to use the 1.33 + // javax.lang.model.element.Modifier, we will need to remove this. 1.34 + else if (((MethodDoc)member).isDefault()) { 1.35 + code.addContent("default "); 1.36 + } 1.37 } 1.38 if (member.isStatic()) { 1.39 code.addContent("static "); 1.40 @@ -547,6 +564,9 @@ 1.41 methodType = (classdoc.isInterface() || ((MethodDoc)member).isAbstract()) ? 1.42 methodType | MethodTypes.ABSTRACT.value() : 1.43 methodType | MethodTypes.CONCRETE.value(); 1.44 + if (((MethodDoc)member).isDefault()) { 1.45 + methodType = methodType | MethodTypes.DEFAULT.value(); 1.46 + } 1.47 if (Util.isDeprecated(member) || Util.isDeprecated(classdoc)) { 1.48 methodType = methodType | MethodTypes.DEPRECATED.value(); 1.49 }