diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
index a7cad980bbc..0809e184705 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
@@ -25,12 +25,12 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-
-import com.sun.javadoc.*;
import java.io.*;
import java.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
/**
* Generate Index for all the Member Names with Indexing in
* Unicode Order. This class is a base class for {@link SingleIndexWriter} and
@@ -100,18 +100,22 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
h2();
strong(unicode.toString());
h2End();
- dl();
- for (int i = 0; i < memberlist.size(); i++) {
- Doc element = memberlist.get(i);
- if (element instanceof MemberDoc) {
- printDescription((MemberDoc)element);
- } else if (element instanceof ClassDoc) {
- printDescription((ClassDoc)element);
- } else if (element instanceof PackageDoc) {
- printDescription((PackageDoc)element);
+ int memberListSize = memberlist.size();
+ // Display the list only if there are elements to be displayed.
+ if (memberListSize > 0) {
+ dl();
+ for (int i = 0; i < memberListSize; i++) {
+ Doc element = memberlist.get(i);
+ if (element instanceof MemberDoc) {
+ printDescription((MemberDoc)element);
+ } else if (element instanceof ClassDoc) {
+ printDescription((ClassDoc)element);
+ } else if (element instanceof PackageDoc) {
+ printDescription((PackageDoc)element);
+ }
}
+ dlEnd();
}
- dlEnd();
hr();
}
@@ -126,8 +130,10 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
printPackageLink(pkg, Util.getPackageName(pkg), true);
print(" - ");
print(configuration.getText("doclet.package") + " " + pkg.name());
+ dtEnd();
dd();
printSummaryComment(pkg);
+ ddEnd();
}
/**
@@ -140,8 +146,10 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_INDEX, cd, true));
print(" - ");
printClassInfo(cd);
+ dtEnd();
dd();
printComment(cd);
+ ddEnd();
}
/**
@@ -178,8 +186,10 @@ public class AbstractIndexWriter extends HtmlDocletWriter {
println(" - ");
printMemberDesc(member);
println();
+ dtEnd();
dd();
printComment(member);
+ ddEnd();
println();
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
index 268dbe009fb..d6c298f13da 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
@@ -25,12 +25,12 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
+import java.lang.reflect.Modifier;
+import java.util.*;
import com.sun.javadoc.*;
-import java.util.*;
-import java.lang.reflect.Modifier;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.internal.toolkit.taglets.*;
/**
* The base class for member writers.
@@ -38,6 +38,7 @@ import java.lang.reflect.Modifier;
* @author Robert Field
* @author Atul M Dambalkar
* @author Jamie Ho (Re-write)
+ * @author Bhavesh Patel (Modified)
*/
public abstract class AbstractMemberWriter {
@@ -232,10 +233,26 @@ public abstract class AbstractMemberWriter {
}
}
+ /**
+ * Print the deprecated output for the given member.
+ *
+ * @param member the member being documented.
+ */
+ protected void printDeprecated(ProgramElementDoc member) {
+ String output = (new DeprecatedTaglet()).getTagletOutput(member,
+ writer.getTagletWriterInstance(false)).toString().trim();
+ if (!output.isEmpty()) {
+ writer.printMemberDetailsListStartTag();
+ writer.print(output);
+ }
+ }
+
protected void printComment(ProgramElementDoc member) {
if (member.inlineTags().length > 0) {
+ writer.printMemberDetailsListStartTag();
writer.dd();
writer.printInlineComment(member);
+ writer.ddEnd();
}
}
@@ -266,6 +283,14 @@ public abstract class AbstractMemberWriter {
writer.printTags(member);
}
+ /**
+ * Write the member footer.
+ */
+ protected void printMemberFooter() {
+ writer.printMemberDetailsListEndTag();
+ assert !writer.getMemberDetailsListPrinted();
+ }
+
/**
* Forward to containing writer
*/
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
index 570f27542dd..1442e3ccf0c 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
@@ -25,11 +25,11 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.javadoc.*;
-
import java.io.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* Writes annotation type optional member documentation in HTML format.
*
@@ -63,14 +63,20 @@ public class AnnotationTypeOptionalMemberWriterImpl extends
* {@inheritDoc}
*/
public void writeDefaultValueInfo(MemberDoc member) {
- writer.dl();
- writer.dt();
- writer.strong(ConfigurationImpl.getInstance().
- getText("doclet.Default"));
- writer.dd();
- writer.print(((AnnotationTypeElementDoc) member).defaultValue());
- writer.ddEnd();
- writer.dlEnd();
+ if (((AnnotationTypeElementDoc) member).defaultValue() != null) {
+ writer.printMemberDetailsListStartTag();
+ writer.dd();
+ writer.dl();
+ writer.dt();
+ writer.strong(ConfigurationImpl.getInstance().
+ getText("doclet.Default"));
+ writer.dtEnd();
+ writer.dd();
+ writer.print(((AnnotationTypeElementDoc) member).defaultValue());
+ writer.ddEnd();
+ writer.dlEnd();
+ writer.ddEnd();
+ }
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
index 801ec8a241d..01e517ce426 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
@@ -25,12 +25,11 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.javadoc.*;
-
import java.io.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+
/**
* Writes annotation type required member documentation in HTML format.
*
@@ -134,17 +133,14 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
strong(member.name());
}
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
* {@inheritDoc}
*/
public void writeComments(MemberDoc member) {
- if (member.inlineTags().length > 0) {
- writer.dd();
- writer.printInlineComment(member);
- }
+ printComment(member);
}
/**
@@ -160,7 +156,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
* Write the annotation type member footer.
*/
public void writeMemberFooter() {
- writer.dlEnd();
+ printMemberFooter();
}
/**
@@ -267,9 +263,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter
* {@inheritDoc}
*/
public void writeDeprecated(MemberDoc member) {
- print(((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(member,
- writer.getTagletWriterInstance(false))).toString());
+ printDeprecated(member);
}
private Type getType(MemberDoc member) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
index fc2527db89b..594ce856a05 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java
@@ -25,10 +25,10 @@
package com.sun.tools.doclets.formats.html;
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.builders.*;
-import com.sun.javadoc.*;
/**
* Generate the Class Information Page.
@@ -165,8 +165,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
* {@inheritDoc}
*/
public void writeAnnotationTypeSignature(String modifiers) {
- dl();
- dt();
preNoNewLine();
writeAnnotationInfo(annotationType);
print(modifiers);
@@ -178,7 +176,6 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
} else {
strong(name);
}
- dlEnd();
preEnd();
p();
}
@@ -334,6 +331,7 @@ public class AnnotationTypeWriterImpl extends SubWriterHolderWriter
} else {
strongText("doclet.Enclosing_Class");
}
+ dtEnd();
dd();
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,
false));
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
index c15f76367dc..8044b42dcbf 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
@@ -25,12 +25,12 @@
package com.sun.tools.doclets.formats.html;
+import java.util.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.builders.*;
-import com.sun.javadoc.*;
-
-import java.util.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
/**
@@ -171,8 +171,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter
*/
public void writeClassSignature(String modifiers) {
boolean isInterface = classDoc.isInterface();
- dl();
- dt();
preNoNewLine();
writeAnnotationInfo(classDoc);
print(modifiers);
@@ -191,7 +189,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
Type superclass = Util.getFirstVisibleSuperClass(classDoc,
configuration());
if (superclass != null) {
- dt();
+ println();
print("extends ");
printLink(new LinkInfoImpl(
LinkInfoImpl.CONTEXT_CLASS_SIGNATURE_PARENT_NAME,
@@ -208,7 +206,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
continue;
}
if (counter == 0) {
- dt();
+ println();
print(isInterface? "extends " : "implements ");
} else {
print(", ");
@@ -219,7 +217,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter
counter++;
}
}
- dlEnd();
preEnd();
p();
}
@@ -342,6 +339,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
TagletOutput output = (new ParamTaglet()).getTagletOutput(classDoc,
getTagletWriterInstance(false));
print(output.toString());
+ dtEnd();
dlEnd();
}
}
@@ -360,8 +358,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl();
dt();
strongText("doclet.Subclasses");
+ dtEnd();
writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES,
subclasses);
+ dlEnd();
}
}
}
@@ -376,8 +376,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl();
dt();
strongText("doclet.Subinterfaces");
+ dtEnd();
writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES,
subInterfaces);
+ dlEnd();
}
}
}
@@ -398,8 +400,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl();
dt();
strongText("doclet.Implementing_Classes");
+ dtEnd();
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES,
implcl);
+ dlEnd();
}
}
@@ -414,8 +418,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl();
dt();
strongText("doclet.All_Implemented_Interfaces");
+ dtEnd();
writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES,
interfaceArray);
+ dlEnd();
}
}
@@ -430,8 +436,10 @@ public class ClassWriterImpl extends SubWriterHolderWriter
dl();
dt();
strongText("doclet.All_Superinterfaces");
+ dtEnd();
writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES,
interfaceArray);
+ dlEnd();
}
}
@@ -455,7 +463,6 @@ public class ClassWriterImpl extends SubWriterHolderWriter
}
}
ddEnd();
- dlEnd();
}
protected void navLinkTree() {
@@ -574,6 +581,7 @@ public class ClassWriterImpl extends SubWriterHolderWriter
} else {
strongText("doclet.Enclosing_Class");
}
+ dtEnd();
dd();
printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass,
false));
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
index 72d2e7ca4c5..cb5adbdeeaf 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
@@ -25,12 +25,12 @@
package com.sun.tools.doclets.formats.html;
+import java.io.*;
+import java.util.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.javadoc.*;
-import java.util.*;
-import java.io.*;
/**
* Writes constructor documentation.
@@ -149,7 +149,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
writeParameters(constructor);
writeExceptions(constructor);
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
@@ -158,12 +158,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
* @param constructor the constructor being documented.
*/
public void writeDeprecated(ConstructorDoc constructor) {
- String output = ((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(constructor,
- writer.getTagletWriterInstance(false))).toString();
- if (output != null && output.trim().length() > 0) {
- writer.print(output);
- }
+ printDeprecated(constructor);
}
/**
@@ -172,10 +167,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
* @param constructor the constructor being documented.
*/
public void writeComments(ConstructorDoc constructor) {
- if (constructor.inlineTags().length > 0) {
- writer.dd();
- writer.printInlineComment(constructor);
- }
+ printComment(constructor);
}
/**
@@ -191,7 +183,7 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter
* Write the constructor footer.
*/
public void writeConstructorFooter() {
- writer.dlEnd();
+ printMemberFooter();
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
index 226d9086eeb..1d5b4ffbd29 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
@@ -25,13 +25,12 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
-
import java.io.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
/**
* Writes enum constant documentation in HTML format.
*
@@ -146,26 +145,21 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
strong(enumConstant.name());
}
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
* {@inheritDoc}
*/
public void writeDeprecated(FieldDoc enumConstant) {
- print(((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(enumConstant,
- writer.getTagletWriterInstance(false))).toString());
+ printDeprecated(enumConstant);
}
/**
* {@inheritDoc}
*/
public void writeComments(FieldDoc enumConstant) {
- if (enumConstant.inlineTags().length > 0) {
- writer.dd();
- writer.printInlineComment(enumConstant);
- }
+ printComment(enumConstant);
}
/**
@@ -179,7 +173,7 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter
* {@inheritDoc}
*/
public void writeEnumConstantFooter() {
- writer.dlEnd();
+ printMemberFooter();
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
index cf37e9ad958..bd97166b8ab 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
@@ -25,13 +25,12 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
-
import java.io.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
/**
* Writes field documentation in HTML format.
*
@@ -156,7 +155,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
strong(field.name());
}
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
@@ -165,9 +164,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
* @param field the field being documented.
*/
public void writeDeprecated(FieldDoc field) {
- print(((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(field,
- writer.getTagletWriterInstance(false))).toString());
+ printDeprecated(field);
}
/**
@@ -178,10 +175,12 @@ public class FieldWriterImpl extends AbstractMemberWriter
public void writeComments(FieldDoc field) {
ClassDoc holder = field.containingClass();
if (field.inlineTags().length > 0) {
+ writer.printMemberDetailsListStartTag();
if (holder.equals(classdoc) ||
(! (holder.isPublic() || Util.isLinkable(holder, configuration())))) {
writer.dd();
writer.printInlineComment(field);
+ writer.ddEnd();
} else {
String classlink = writer.codeText(
writer.getDocLink(LinkInfoImpl.CONTEXT_FIELD_DOC_COPY,
@@ -196,6 +195,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
writer.ddEnd();
writer.dd();
writer.printInlineComment(field);
+ writer.ddEnd();
}
}
}
@@ -213,7 +213,7 @@ public class FieldWriterImpl extends AbstractMemberWriter
* Write the field footer.
*/
public void writeFieldFooter() {
- writer.dlEnd();
+ printMemberFooter();
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
index 352eeb7010b..8f15eee3ab6 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
@@ -24,17 +24,16 @@
*/
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.formats.html.markup.*;
-import com.sun.tools.doclets.internal.toolkit.*;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.tools.doclets.internal.toolkit.taglets.*;
-
-import com.sun.javadoc.*;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.*;
+import com.sun.tools.doclets.internal.toolkit.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+import com.sun.tools.doclets.internal.toolkit.taglets.*;
/**
* Class for the Html Format Code Generation specific to JavaDoc.
@@ -44,6 +43,7 @@ import java.util.*;
* @since 1.2
* @author Atul M Dambalkar
* @author Robert Field
+ * @author Bhavesh Patel (Modified)
*/
public class HtmlDocletWriter extends HtmlDocWriter {
@@ -205,7 +205,13 @@ public class HtmlDocletWriter extends HtmlDocWriter {
private void printMethodInfo(MethodDoc method) {
ClassDoc[] intfacs = method.containingClass().interfaces();
MethodDoc overriddenMethod = method.overriddenMethod();
- if (intfacs.length > 0 || overriddenMethod != null) {
+ // Check whether there is any implementation or overridden info to be
+ // printed. If no overridden or implementation info needs to be
+ // printed, do not print this section.
+ if ((intfacs.length > 0 &&
+ new ImplementedMethods(method, this.configuration).build().length > 0) ||
+ overriddenMethod != null) {
+ printMemberDetailsListStartTag();
dd();
printTagsInfoHeader();
MethodWriterImpl.printImplementsInfo(this, method);
@@ -216,7 +222,6 @@ public class HtmlDocletWriter extends HtmlDocWriter {
printTagsInfoFooter();
ddEnd();
}
- dd();
}
protected void printTags(Doc doc) {
@@ -230,41 +235,35 @@ public class HtmlDocletWriter extends HtmlDocWriter {
TagletWriter.genTagOuput(configuration.tagletManager, doc,
configuration.tagletManager.getCustomTags(doc),
getTagletWriterInstance(false), output);
- if (output.toString().trim().length() > 0) {
- printTagsInfoHeader();
- print(output.toString());
- printTagsInfoFooter();
- } else if (! (doc instanceof ConstructorDoc ||
- doc instanceof RootDoc || doc instanceof ClassDoc)) {
- //To be consistent with 1.4.2 output.
- //I hate to do this but we have to pass the diff test to prove
- //nothing has broken.
+ String outputString = output.toString().trim();
+ // For RootDoc and ClassDoc, this section is not the definition description
+ // but the start of definition list.
+ if (!outputString.isEmpty()) {
+ if (!(doc instanceof RootDoc || doc instanceof ClassDoc)) {
+ printMemberDetailsListStartTag();
+ dd();
+ }
printTagsInfoHeader();
+ print(outputString);
printTagsInfoFooter();
+ if (!(doc instanceof RootDoc || doc instanceof ClassDoc))
+ ddEnd();
}
}
/**
- * Check whether there are any tags to be printed.
+ * Check whether there are any tags for Serialization Overview
+ * section to be printed.
*
- * @param doc the Doc object to check for tags.
+ * @param field the FieldDoc object to check for tags.
* @return true if there are tags to be printed else return false.
*/
- protected boolean hasTagsToPrint(Doc doc) {
- if (doc instanceof MethodDoc) {
- ClassDoc[] intfacs = ((MethodDoc)doc).containingClass().interfaces();
- MethodDoc overriddenMethod = ((MethodDoc)doc).overriddenMethod();
- if ((intfacs.length > 0 &&
- new ImplementedMethods((MethodDoc)doc, this.configuration).build().length > 0) ||
- overriddenMethod != null) {
- return true;
- }
- }
+ protected boolean hasSerializationOverviewTags(FieldDoc field) {
TagletOutputImpl output = new TagletOutputImpl("");
- TagletWriter.genTagOuput(configuration.tagletManager, doc,
- configuration.tagletManager.getCustomTags(doc),
+ TagletWriter.genTagOuput(configuration.tagletManager, field,
+ configuration.tagletManager.getCustomTags(field),
getTagletWriterInstance(false), output);
- return (output.toString().trim().isEmpty());
+ return (!output.toString().trim().isEmpty());
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
index 3e84b00dbb6..15508ed643b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
@@ -25,11 +25,12 @@
package com.sun.tools.doclets.formats.html;
+import java.util.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
-import java.util.*;
/**
* Generate serialized form for serializable fields.
@@ -37,6 +38,7 @@ import java.util.*;
* serialField
is processed.
*
* @author Joe Fialli
+ * @author Bhavesh Patel (Modified)
*/
public class HtmlSerialFieldWriter extends FieldWriterImpl
implements SerializedFormWriter.SerialFieldWriter {
@@ -75,7 +77,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
writer.println();
if (heading.equals(
configuration().getText("doclet.Serialized_Form_class"))) {
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
} else {
writer.printTableHeadingBackground(heading);
@@ -102,7 +104,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
print(fieldDimensions + ' ');
strong(fieldName);
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
@@ -111,9 +113,7 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to document.
*/
public void writeMemberDeprecatedInfo(FieldDoc field) {
- print(((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(field,
- writer.getTagletWriterInstance(false))).toString());
+ printDeprecated(field);
}
/**
@@ -123,14 +123,17 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
*/
public void writeMemberDescription(FieldDoc field) {
if (field.inlineTags().length > 0) {
+ writer.printMemberDetailsListStartTag();
writer.dd();
writer.printInlineComment(field);
+ writer.ddEnd();
}
Tag[] tags = field.tags("serial");
if (tags.length > 0) {
- writer.dt();
+ writer.printMemberDetailsListStartTag();
writer.dd();
writer.printInlineComment(field, tags[0]);
+ writer.ddEnd();
}
}
@@ -140,9 +143,14 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param serialFieldTag the field to document (represented by tag).
*/
public void writeMemberDescription(SerialFieldTag serialFieldTag) {
- writer.dd();
- writer.print(serialFieldTag.description());
- writer.dlEnd();
+ String serialFieldTagDesc = serialFieldTag.description().trim();
+ if (!serialFieldTagDesc.isEmpty()) {
+ writer.dl();
+ writer.dd();
+ writer.print(serialFieldTagDesc);
+ writer.ddEnd();
+ writer.dlEnd();
+ }
}
/**
@@ -151,33 +159,57 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl
* @param field the field to document.
*/
public void writeMemberTags(FieldDoc field) {
- writer.dl();
TagletOutputImpl output = new TagletOutputImpl("");
TagletWriter.genTagOuput(configuration().tagletManager, field,
configuration().tagletManager.getCustomTags(field),
writer.getTagletWriterInstance(false), output);
- if (output.toString().length() > 0) {
- print(output.toString());
+ String outputString = output.toString().trim();
+ if (!outputString.isEmpty()) {
+ writer.printMemberDetailsListStartTag();
+ writer.dd();
+ writer.dl();
+ print(outputString);
+ writer.dlEnd();
+ writer.ddEnd();
}
- writer.dlEnd();
- }
- public void writeMemberFooter(FieldDoc member) {
- writer.dlEnd();
}
/**
- * Check to see if member details should be printed. If
+ * Check to see if overview details should be printed. If
* nocomment option set or if there is no text to be printed
- * for deprecation info, inline comment, no serial tag or inline tags,
- * do not print member details.
+ * for deprecation info, comment or tags, do not print overview details.
+ *
+ * @param field the field to check overview details for.
+ * @return true if overview details need to be printed
*/
- public boolean shouldPrintMemberDetails(FieldDoc field) {
- if (!configuration().nocomment)
- if((field.inlineTags().length > 0) ||
- (field.tags("serial").length > 0) || (writer.hasTagsToPrint(field)))
+ public boolean shouldPrintOverview(FieldDoc field) {
+ if (!configuration().nocomment) {
+ if(!field.commentText().isEmpty() ||
+ writer.hasSerializationOverviewTags(field))
return true;
- if (!Util.isDeprecated(field))
+ }
+ if (field.tags("deprecated").length > 0)
return true;
return false;
}
+
+ public void writeMemberFooter() {
+ printMemberFooter();
+ }
+
+ /**
+ * Write the footer information. If the serilization overview section was
+ * printed, check for definition list and close list tag.
+ *
+ * @param heading the heading that was written.
+ */
+ public void writeFooter(String heading) {
+ if (printedOverallAnchor) {
+ if (heading.equals(
+ configuration().getText("doclet.Serialized_Form_class"))) {
+ writer.printMemberDetailsListEndTag();
+ assert !writer.getMemberDetailsListPrinted();
+ }
+ }
+ }
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
index 9c0daf8e8cf..083ee7f25cd 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
@@ -25,9 +25,9 @@
package com.sun.tools.doclets.formats.html;
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import com.sun.javadoc.*;
/**
* Generate serialized form for Serializable/Externalizable methods.
@@ -66,14 +66,12 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
writeSignature(member);
}
- public void writeMemberFooter(MethodDoc member) {
- writer.dlEnd();
+ public void writeMemberFooter() {
+ printMemberFooter();
}
public void writeDeprecatedMemberInfo(MethodDoc member) {
- print(((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(member,
- writer.getTagletWriterInstance(false))).toString());
+ printDeprecated(member);
}
public void writeMemberDescription(MethodDoc member) {
@@ -81,23 +79,27 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements
}
public void writeMemberTags(MethodDoc member) {
- writer.dd();
- writer.dl();
TagletOutputImpl output = new TagletOutputImpl("");
TagletManager tagletManager =
ConfigurationImpl.getInstance().tagletManager;
TagletWriter.genTagOuput(tagletManager, member,
tagletManager.getSerializedFormTags(),
writer.getTagletWriterInstance(false), output);
- print(output.toString());
+ String outputString = output.toString().trim();
+ if (!outputString.isEmpty()) {
+ writer.printMemberDetailsListStartTag();
+ writer.dd();
+ writer.dl();
+ print(outputString);
+ writer.dlEnd();
+ writer.ddEnd();
+ }
MethodDoc method = member;
if (method.name().compareTo("writeExternal") == 0
&& method.tags("serialData").length == 0) {
serialWarning(member.position(), "doclet.MissingSerialDataTag",
method.containingClass().qualifiedName(), method.name());
}
- writer.ddEnd();
- writer.dlEnd();
}
protected void printTypeLinkNoDimension(Type type) {
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
index 7a4da14b0d6..a74283179b3 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
@@ -25,13 +25,13 @@
package com.sun.tools.doclets.formats.html;
+import java.io.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
-import java.io.*;
-import com.sun.javadoc.*;
-
/**
* Writes method documentation in HTML format.
*
@@ -172,7 +172,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
writeParameters(method);
writeExceptions(method);
writer.preEnd();
- writer.dl();
+ assert !writer.getMemberDetailsListPrinted();
}
/**
@@ -181,12 +181,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
* @param method the method being documented.
*/
public void writeDeprecated(MethodDoc method) {
- String output = ((TagletOutputImpl)
- (new DeprecatedTaglet()).getTagletOutput(method,
- writer.getTagletWriterInstance(false))).toString();
- if (output != null && output.trim().length() > 0) {
- writer.print(output);
- }
+ printDeprecated(method);
}
/**
@@ -197,11 +192,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
public void writeComments(Type holder, MethodDoc method) {
ClassDoc holderClassDoc = holder.asClassDoc();
if (method.inlineTags().length > 0) {
+ writer.printMemberDetailsListStartTag();
if (holder.asClassDoc().equals(classdoc) ||
(! (holderClassDoc.isPublic() ||
Util.isLinkable(holderClassDoc, configuration())))) {
writer.dd();
writer.printInlineComment(method);
+ writer.ddEnd();
} else {
String classlink = writer.codeText(
writer.getDocLink(LinkInfoImpl.CONTEXT_METHOD_DOC_COPY,
@@ -217,6 +214,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
writer.ddEnd();
writer.dd();
writer.printInlineComment(method);
+ writer.ddEnd();
}
}
}
@@ -234,8 +232,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
* Write the method footer.
*/
public void writeMethodFooter() {
- writer.ddEnd();
- writer.dlEnd();
+ printMemberFooter();
}
/**
@@ -318,6 +315,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
String name = method.name();
writer.dt();
writer.strongText(label);
+ writer.dtEnd();
writer.dd();
String methLink = writer.codeText(
writer.getLink(
@@ -326,6 +324,7 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
writer.getAnchor(method), name, false)
));
writer.printText("doclet.in_class", methLink, overriddenTypeLink);
+ writer.ddEnd();
}
}
@@ -364,11 +363,13 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter
LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac)));
writer.dt();
writer.strongText("doclet.Specified_By");
+ writer.dtEnd();
writer.dd();
methlink = writer.codeText(writer.getDocLink(
LinkInfoImpl.CONTEXT_MEMBER, implementedMeth,
implementedMeth.name(), false));
writer.printText("doclet.in_interface", methlink, intfaclink);
+ writer.ddEnd();
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
index 2b3d2ea3709..23803455ad1 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
@@ -25,11 +25,11 @@
package com.sun.tools.doclets.formats.html;
+import java.io.*;
+
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
-
-import java.io.*;
/**
* Writes nested class documentation in HTML format.
@@ -129,7 +129,6 @@ public class NestedClassWriterImpl extends AbstractMemberWriter
writer.println("");
}
writer.anchor(nestedClass.name());
- writer.dl();
writer.h3();
writer.print(nestedClass.name());
writer.h3End();
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java
index 638c6d4d75f..12f6d4e0466 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java
@@ -25,10 +25,11 @@
package com.sun.tools.doclets.formats.html;
-import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
import java.io.*;
+import com.sun.javadoc.*;
+import com.sun.tools.doclets.internal.toolkit.util.*;
+
/**
* Class to generate Tree page for a package. The name of the file generated is
* "package-tree.html" and it is generated in the respective package directory.
@@ -145,8 +146,10 @@ public class PackageTreeWriter extends AbstractTreeWriter {
dl();
dt();
strongText("doclet.Package_Hierarchies");
+ dtEnd();
dd();
navLinkMainTree(configuration.getText("doclet.All_Packages"));
+ ddEnd();
dlEnd();
hr();
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
index 353937f630a..e83e6f9bdfe 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java
@@ -25,17 +25,18 @@
package com.sun.tools.doclets.formats.html;
+import com.sun.javadoc.*;
import com.sun.tools.doclets.internal.toolkit.*;
import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
import com.sun.tools.doclets.internal.toolkit.taglets.*;
import com.sun.tools.doclets.internal.toolkit.util.*;
-import com.sun.javadoc.*;
/**
* The taglet writer that writes HTML.
*
* @since 1.5
* @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
*/
public class TagletWriterImpl extends TagletWriter {
@@ -99,11 +100,12 @@ public class TagletWriterImpl extends TagletWriter {
output.append(DocletConstants.NL + "
" + DocletConstants.NL); } + output.append(""); } else { if (Util.isDeprecated(member.containingClass())) { output.append("
" + paramName + "
"
- + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false));
+ + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "Link to external member gcd
"},
{BUG_ID + FS + "C.html",
- "Overrides:toString
in class java.lang.Object
"}
+ "Overrides:toString
in class java.lang.Object
"}
};
private static final String[][] NEGATED_TEST = NO_TEST;
private static final String[] ARGS =
diff --git a/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java b/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
index cd892a4e31d..ed27a7b4bac 100644
--- a/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
+++ b/langtools/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java
@@ -45,9 +45,10 @@ public class TestConstructorIndent extends JavadocTester {
//Input for string search tests.
private static final String[][] TEST = {
- {BUG_ID + FS + "C.html", ""+NL+"
i
- a param." + NL + "
i
- a param." + NL + - "
@Deprecated" + NL + + "" + NL + diff --git a/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java b/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java index 4308ccfe27f..204b1a9772e 100644 --- a/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java +++ b/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java @@ -39,13 +39,13 @@ public class TestExternalOverridenMethod extends JavadocTester { private static final String BUG_ID = "4857717"; private static final String[][] TEST = { {BUG_ID + FS + "pkg" + FS + "XReader.html", - "Overrides:@Deprecated" + NL + "public class DeprecatedClassByAnnotation"}, {TARGET_FILE2, "public int field" + NL + "" + NL + - "
- Deprecated.
"}, + "
"}, {TARGET_FILE2, "@Deprecated" + NL + "public DeprecatedClassByAnnotation()- Deprecated.
Overrides:read
in class " +
"FilterReader"},
{BUG_ID + FS + "pkg" + FS + "XReader.html",
- "Specified by:Specified by:readInt
in interface " +
"- "
+ "See Also:
- "
},
//Header does not link to the page itself.
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
new file mode 100644
index 00000000000..5fa8db63ca5
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
@@ -0,0 +1,370 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+/*
+ * @test
+ * @bug 6786690
+ * @summary This test verifies the nesting of definition list tags.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester
+ * @build TestHtmlDefinitionListTag
+ * @run main TestHtmlDefinitionListTag
+ */
+
+public class TestHtmlDefinitionListTag extends JavadocTester {
+
+ private static final String BUG_ID = "6786690";
+
+ // Test common to all runs of javadoc. The class signature should print
+ // properly enclosed definition list tags and the Annotation Type
+ // Optional Element should print properly nested definition list tags
+ // for default value.
+ private static final String[][] TEST_ALL = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "
public class " +
+ "C1" + NL + "extends " +
+ "java.lang.Object" + NL + "implements " +
+ "java.io.Serializable
"},
+ {BUG_ID + FS + "pkg1" + FS + "C4.html", "" + NL + "" + NL +
+ "- Default:
- true
" + NL +
+ "
" + NL + " " + NL + "
"}};
+
+ // Test for normal run of javadoc in which various ClassDocs and
+ // serialized form should have properly nested definition list tags
+ // enclosing comments, tags and deprecated information.
+ private static final String[][] TEST_CMNT_DEPR = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Since:
" + NL +
+ " - JDK1.0
" + NL + "- See Also:
- " +
+ "" +
+ "
C2
, " + NL +
+ "" +
+ "Serialized Form
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
. " +
+ "- This field indicates whether the C1 is undecorated." + NL +
+ "
" + NL + "
" + NL + "" + NL + "- " +
+ "Since:
" + NL + " - 1.4
" + NL + "- " +
+ "See Also:
- " +
+ "
" +
+ "setUndecorated(boolean)
" + NL +" " + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Constructor." + NL + "
" + NL + "
" + NL +
+ "" + NL + "- Parameters:
- " +
+ "
title
- the title test
" +
+ " - boolean value " + NL + "- Throws:
" + NL +
+ "java.lang.IllegalArgumentException
" +
+ " - if the owner
's" + NL + " GraphicsConfiguration" +
+ "
is not from a screen device " + NL +"" +
+ "HeadlessException
" + NL + " " + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Method comments." + NL + "
" + NL +
+ "
" + NL + "" + NL + "- Parameters:" +
+ "
undecorated
- true
" +
+ " if no decorations are" + NL + " to be enabled;" + NL +
+ " false
if decorations are to be enabled." +
+ "- Since:
" + NL +
+ " - 1.4
" + NL + "- See Also:
" +
+ "" +
+ "readObject()
" + NL + " " + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL + "" + NL +
+ "- Throws:
" + NL + "" +
+ "java.io.IOException
- See Also:" +
+ "
- " +
+ "" +
+ "
setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "" + NL +
+ "- No modal exclusion." + NL + "
" + NL +"
" + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" + NL + "- Constructor." + NL +
+ "
" + NL +"
" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" + NL + "- " +
+ "Deprecated. As of JDK version 1.5, replaced " +
+ "by" + NL + " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
- Set visible." + NL + "
" + NL + "
" +NL +
+ "" + NL + "- Parameters:
- " +
+ "
set
- boolean - Since:
" + NL +
+ " - 1.4
" + NL + " " + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C3.html", "" + NL + "- Comment." + NL +
+ "
" + NL + "
" + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "" + NL +
+ "- Throws:
" + NL + "" +
+ "java.io.IOException
- See Also:" +
+ "
- " +
+ "
C1.setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated. As of JDK version " +
+ "1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
. " +
+ "- This field indicates whether the C1 is undecorated." + NL +
+ "
" + NL + "
" + NL + "-
" + NL +
+ "" + NL + "- Since:
" + NL +
+ " - 1.4
" + NL + "- See Also:" +
+ "
- " +
+ "
C1.setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
- Reads the object stream." + NL + "
" + NL +
+ "
" + NL + "" + NL + "- Throws:" +
+ "
" + NL + "" +
+ "IOException
" + NL +
+ "java.io.IOException
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated.
- " +
+ "The name for this class." + NL + "
" + NL + "
" + NL +
+ "-
" + NL + "
"}};
+
+ // Test with -nocomment option. The ClassDocs and serialized form should
+ // have properly nested definition list tags enclosing deprecated
+ // information and should not display definition lists for comments
+ // and tags.
+ private static final String[][] TEST_NOCMNT = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL + "- " +
+ "Deprecated. As of JDK version 1.5, replaced by" + NL +
+ "
" +
+ "setUndecorated(boolean)
.
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" + NL +
+ "- Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C5.html", "" + NL +
+ "protected C5()
" + NL + "" + NL +
+ "- Deprecated.
"},
+ {BUG_ID + FS + "pkg1" + FS + "C5.html", "" + NL +
+ "public void printInfo()
" + NL + "" + NL +
+ "- Deprecated.
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "boolean " +
+ "undecorated
" + NL + "" + NL + "- " +
+ "Deprecated. As of JDK version 1.5, replaced by" + NL +
+ "
" +
+ "setUndecorated(boolean)
.
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "- " +
+ "Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "int " +
+ "publicKey
" + NL + "" + NL + "- " +
+ "Deprecated.
"}};
+
+ // Test with -nodeprecated option. The ClassDocs should have properly nested
+ // definition list tags enclosing comments and tags. The ClassDocs should not
+ // display definition list for deprecated information. The serialized form
+ // should display properly nested definition list tags for comments, tags
+ // and deprecated information.
+ private static final String[][] TEST_NODEPR = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Since:
" + NL +
+ " - JDK1.0
" + NL + "- See Also:
- " +
+ "" +
+ "
C2
, " + NL +
+ "" +
+ "Serialized Form
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Constructor." + NL + "
" + NL + "
" + NL +
+ "" + NL + "- Parameters:
- " +
+ "
title
- the title test
" +
+ " - boolean value " + NL + "- Throws:
" + NL +
+ "java.lang.IllegalArgumentException
" +
+ " - if the owner
's" + NL + " GraphicsConfiguration" +
+ "
is not from a screen device " + NL +"" +
+ "HeadlessException
" + NL + " " + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL +
+ "- Method comments." + NL + "
" + NL +
+ "
" + NL + "" + NL + "- Parameters:" +
+ "
undecorated
- true
" +
+ " if no decorations are" + NL + " to be enabled;" + NL +
+ " false
if decorations are to be enabled." +
+ "- Since:
" + NL +
+ " - 1.4
" + NL + "- See Also:
" +
+ "" +
+ "readObject()
" + NL + " " + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL + "" + NL +
+ "- Throws:
" + NL + "" +
+ "java.io.IOException
- See Also:" +
+ "
- " +
+ "" +
+ "
setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "" + NL +
+ "- No modal exclusion." + NL + "
" + NL +"
" + NL +
+ "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" + NL + "- Constructor." + NL +
+ "
" + NL +"
" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C3.html", "" + NL + "- Comment." + NL +
+ "
" + NL + "
" + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "" + NL +
+ "- Throws:
" + NL + "" +
+ "java.io.IOException
- See Also:" +
+ "
- " +
+ "
C1.setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated. As of JDK version " +
+ "1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
. " +
+ "- This field indicates whether the C1 is undecorated." + NL +
+ "
" + NL + "
" + NL + "-
" + NL +
+ "" + NL + "- Since:
" + NL +
+ " - 1.4
" + NL + "- See Also:" +
+ "
- " +
+ "
C1.setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
- Reads the object stream." + NL + "
" + NL +
+ "
" + NL + "" + NL + "- Throws:" +
+ "
" + NL + "" +
+ "IOException
" + NL +
+ "java.io.IOException
" + NL +
+ " " + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL +
+ "- Deprecated.
- " +
+ "The name for this class." + NL + "
" + NL + "
" + NL +
+ "-
" + NL + "
"}};
+
+ // Test with -nocomment and -nodeprecated options. The ClassDocs whould
+ // not display definition lists for any member details. The serialized
+ // form should display properly nested definition list tags for
+ // deprecated information only.
+ private static final String[][] TEST_NOCMNT_NODEPR = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL + "public void " +
+ "readObject()" + NL + " throws" +
+ " java.io.IOException
" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" +NL + "public " +
+ "C2()
" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "" + NL +
+ "public static final " +
+ "C1.ModalExclusionType " +
+ "APPLICATION_EXCLUDE
" + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "boolean " +
+ "undecorated
" + NL + "" + NL + "- " +
+ "Deprecated. As of JDK version 1.5, replaced by" + NL +
+ "
" +
+ "setUndecorated(boolean)
.
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "- " +
+ "Deprecated. As of JDK version" +
+ " 1.5, replaced by" + NL +
+ " " +
+ "
setUndecorated(boolean)
." + NL + "" + NL +
+ "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "int " +
+ "publicKey
" + NL + "" + NL + "- " +
+ "Deprecated.
"}};
+
+ // Test for valid HTML generation which should not comprise of empty
+ // definition list tags.
+ private static final String[][] NEGATED_TEST = {
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.ModalType.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C2.ModalType.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C3.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C3.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C4.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C4.html", "" + NL + "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C5.html", "
"},
+ {BUG_ID + FS + "pkg1" + FS + "C5.html", "" + NL + "
"},
+ {BUG_ID + FS + "overview-tree.html", "
"},
+ {BUG_ID + FS + "overview-tree.html", "" + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "
"}};
+
+ private static final String[] ARGS1 =
+ new String[] {
+ "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"};
+
+ private static final String[] ARGS2 =
+ new String[] {
+ "-d", BUG_ID, "-nocomment", "-sourcepath", SRC_DIR, "pkg1"};
+
+ private static final String[] ARGS3 =
+ new String[] {
+ "-d", BUG_ID, "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"};
+
+ private static final String[] ARGS4 =
+ new String[] {
+ "-d", BUG_ID, "-nocomment", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"};
+
+ /**
+ * The entry point of the test.
+ * @param args the array of command line arguments.
+ */
+ public static void main(String[] args) {
+ TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag();
+ run(tester, ARGS1, TEST_ALL, NEGATED_TEST);
+ run(tester, ARGS1, TEST_CMNT_DEPR, NEGATED_TEST);
+ run(tester, ARGS2, TEST_ALL, NEGATED_TEST);
+ run(tester, ARGS2, TEST_NOCMNT, TEST_CMNT_DEPR);
+ run(tester, ARGS3, TEST_ALL, NEGATED_TEST);
+ run(tester, ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR);
+ run(tester, ARGS4, TEST_ALL, NEGATED_TEST);
+ run(tester, ARGS4, TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR);
+ tester.printSummary();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugId() {
+ return BUG_ID;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getBugName() {
+ return getClass().getName();
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C1.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C1.java
new file mode 100644
index 00000000000..a3dbc13e629
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C1.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author Bhavesh Patel
+ * @see C2
+ * @since JDK1.0
+ */
+
+public class C1 implements Serializable {
+
+ /**
+ * This field indicates whether the C1 is undecorated.
+ *
+ * @see #setUndecorated(boolean)
+ * @since 1.4
+ * @serial
+ * @deprecated As of JDK version 1.5, replaced by
+ * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+ */
+ @Deprecated
+ public boolean undecorated = false;
+
+ private String title;
+
+ /**
+ * This enum specifies the possible modal exclusion types.
+ *
+ * @since 1.6
+ */
+ public static enum ModalExclusionType {
+ /**
+ * No modal exclusion.
+ */
+ NO_EXCLUDE,
+ /**
+ * APPLICATION_EXCLUDE
indicates that a top-level window
+ * won't be blocked by any application-modal dialogs. Also, it isn't
+ * blocked by document-modal dialogs from outside of its child hierarchy.
+ */
+ APPLICATION_EXCLUDE
+ };
+
+ /**
+ * Constructor.
+ *
+ * @param title the title
+ * @param test boolean value
+ * @exception IllegalArgumentException if the owner
's
+ * GraphicsConfiguration
is not from a screen device
+ * @exception HeadlessException
+ */
+ public C1(String title, boolean test) {
+
+ }
+
+ public C1(String title) {
+
+ }
+
+ /**
+ * Method comments.
+ * @param undecorated true
if no decorations are
+ * to be enabled;
+ * false
if decorations are to be enabled.
+ * @see #readObject()
+ * @since 1.4
+ */
+ public void setUndecorated(boolean undecorated) {
+ /* Make sure we don't run in the middle of peer creation.*/
+ }
+
+ /**
+ * @see #setUndecorated(boolean)
+ */
+ public void readObject() throws IOException {
+
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C2.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C2.java
new file mode 100644
index 00000000000..b0e098d1e63
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C2.java
@@ -0,0 +1,86 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+import java.io.ObjectInputStream;
+import java.io.IOException;
+import java.io.Serializable;
+
+/**
+ * A class comment for testing.
+ *
+ * @author Bhavesh Patel
+ * @see C1
+ * @since JDK1.0
+ */
+
+public class C2 implements Serializable {
+
+ /**
+ * This field indicates title.
+ */
+ String title;
+
+ public static enum ModalType {
+ NO_EXCLUDE
+ };
+
+ /**
+ * Constructor.
+ *
+ */
+ public C2() {
+
+ }
+
+ public C2(String title) {
+
+ }
+
+ /**
+ * Set visible.
+ *
+ * @param set boolean
+ * @since 1.4
+ * @deprecated As of JDK version 1.5, replaced by
+ * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+ */
+ @Deprecated
+ public void setVisible(boolean set) {
+ }
+
+ /**
+ * Reads the object stream.
+ *
+ * @param s ObjectInputStream
+ * @throws IOException
+ * @deprecated As of JDK version 1.5, replaced by
+ * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}.
+ */
+ @Deprecated
+ public void readObject(ObjectInputStream s) throws IOException {
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C3.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C3.java
new file mode 100644
index 00000000000..cf48cf1cb98
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C3.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+import java.lang.annotation.*;
+
+/**
+ * Test Annotation class.
+ *
+ * @author Bhavesh Patel
+ * @since 1.5
+ */
+@Retention(RetentionPolicy.SOURCE)
+public @interface C3 {
+ /**
+ * Comment.
+ */
+ String[] value();
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C4.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C4.java
new file mode 100644
index 00000000000..0a1fb611c28
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C4.java
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+import java.lang.annotation.*;
+
+/*
+ * The @Inherited annotation has no effect when applied to an interface.
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Inherited
+public @interface C4 {
+ boolean value() default true;
+}
diff --git a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C5.java b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C5.java
new file mode 100644
index 00000000000..00ccb7383af
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C5.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package pkg1;
+
+import java.io.Serializable;
+
+/**
+ * Test for Serializable
+ *
+ * @author Bhavesh Patel
+ * @deprecated This class is no longer used.
+ */
+@Deprecated
+public abstract class C5 implements Serializable {
+
+ /**
+ * The name for this class.
+ *
+ * @serial
+ */
+ private String name;
+
+ /**
+ * @serial
+ */
+ private int publicKey;
+
+ /**
+ * Constructor for serialization only.
+ */
+ protected C5() {
+
+ }
+
+ /**
+ * Prints general information.
+ *
+ */
+ public void printInfo() {
+
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testIndex/TestIndex.java b/langtools/test/com/sun/javadoc/testIndex/TestIndex.java
index 0594d3d9371..52b61a06278 100644
--- a/langtools/test/com/sun/javadoc/testIndex/TestIndex.java
+++ b/langtools/test/com/sun/javadoc/testIndex/TestIndex.java
@@ -73,10 +73,10 @@ public class TestIndex extends JavadocTester {
{BUG_ID + FS + "index-all.html",
"- Java - " + NL +
"Static variable in class pkg.C" + NL +
- "
- " + NL +
+ "
-
" + NL + NL +
" - JDK - " + NL +
"Static variable in class pkg.C" + NL +
- "
- "},
+ "
-
"},
};
private static final String[][] NEGATED_TEST = NO_TEST;
diff --git a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
index 0dd3ebb9003..d5e33d72073 100644
--- a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
@@ -55,7 +55,7 @@ public class TestInterface extends JavadocTester {
// Make sure known implementing class list is correct and omits type parameters.
{BUG_ID + FS + "pkg" + FS + "Interface.html",
- " - All Known Implementing Classes: " +
+ "
- All Known Implementing Classes:
" +
" - Child, " +
"" +
@@ -63,7 +63,9 @@ public class TestInterface extends JavadocTester {
// Make sure "All Implemented Interfaces": has substituted type parameters
{BUG_ID + FS + "pkg" + FS + "Child.html",
- "All Implemented Interfaces:
- Interface<T>"
+ "All Implemented Interfaces:
- " +
+ "" +
+ "Interface<T>"
},
//Make sure Class Tree has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
@@ -75,15 +77,15 @@ public class TestInterface extends JavadocTester {
},
//Make sure "Direct Know Subclasses" omits type parameters
{BUG_ID + FS + "pkg" + FS + "Parent.html",
- "Direct Known Subclasses:
- Child"
+ "Direct Known Subclasses:
- Child"
},
//Make sure "Specified By" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
- "Specified by:
method
in interface Interface<T>
"
+ "Specified by:method
in interface Interface<T>
"
},
//Make sure "Overrides" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
- "Overrides:method
in class Parent<T>
"
+ "Overrides:method
in class Parent<T>
"
},
};
private static final String[][] NEGATED_TEST = {
diff --git a/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java b/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java
index 1a2156ee03c..37b4949a513 100644
--- a/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java
+++ b/langtools/test/com/sun/javadoc/testLinkOption/TestLinkOption.java
@@ -63,7 +63,8 @@ public class TestLinkOption extends JavadocTester {
"title=\"class or interface in java.lang\">Object p3)"
},
{BUG_ID + "-1" + FS + "java" + FS + "lang" + FS + "StringBuilderChild.html",
- "public abstract class StringBuilderChild - extends Object"
+ "public abstract class StringBuilderChild" + NL +
+ "extends Object"
},
};
diff --git a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
index 1eb2c998639..6983423f832 100644
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
@@ -59,7 +59,7 @@ public class TestLinkTaglet extends JavadocTester {
" Link to another inner class:
C.InnerC2
"
},
{BUG_ID + FS + "pkg" + FS + "C.InnerC2.html",
- "Enclosing class: - C"
+ "Enclosing class:
- C"
},
};
private static final String[][] NEGATED_TEST = {
diff --git a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
index 15b9e343267..12da5956f0e 100644
--- a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
+++ b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
@@ -74,7 +74,7 @@ public class TestMemberInheritence extends JavadocTester {
// Test overriding/implementing methods with generic parameters.
{BUG_ID + FS + "pkg" + FS + "BaseClass.html",
- "
- Specified by:
getAnnotation
in interface BaseInterface
getAnnotation
in interface BaseInterface
E
- " +
+ "E
- " +
"the type parameter for this class."},
//Type parameters in @see/@link
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
- "TypeParameters
"},
+ "TypeParameters
T
- This is the first " +
- "type parameter.V
- This is the second type " +
+ "Type Parameters:T
- This is the first " +
+ "type parameter.V
- This is the second type " +
"parameter."},
//Signature of method with type parameters
{BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
@@ -117,17 +117,17 @@ public class TestNewLanguageFeatures extends JavadocTester {
//Signature of subclass that has type parameters.
{BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html",
"public class TypeParameterSubClass<T extends java.lang.String>" +
- "@A"}, {BUG_ID + FS + "pkg1" + FS + "B.html", - "public interface B" + NL + - ""}, + "public interface B"}, //============================================================== @@ -525,7 +525,7 @@ public class TestNewLanguageFeatures extends JavadocTester { "" + NL + "@AnnotationTypeUndocumented(optional=\"Class Annotation\"," + NL + " required=1994)" + NL + - "public class AnnotationTypeUsage
Parameters:param1
- testing 1 2 3." +
+ "Parameters:param1
- testing 1 2 3. " +
"param2
- testing 1 2 3."
},
//Param tags that don't match with any real parameters.
{BUG_ID + FS + "pkg" + FS + "C.html",
- "Parameters:p1
- testing 1 2 3." +
+ "Parameters:p1
- testing 1 2 3. " +
"p2
- testing 1 2 3."
},
//{@inherit} doc misuse does not cause doclet to throw exception.
diff --git a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
index f7f5bda38a9..69ba4a11ce3 100644
--- a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
+++ b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
@@ -96,11 +96,11 @@ public class TestPrivateClasses extends JavadocTester {
//Make sure implemented interfaces from private superclass are inherited
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
- "All Known Implementing Classes: All Known Implementing Classes: PublicChild"},
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
- "All Implemented Interfaces: All Implemented Interfaces: PublicInterface"},
//Generic interface method test.
@@ -174,18 +174,18 @@ public class TestPrivateClasses extends JavadocTester {
},
// Should document that a method overrides method from private class.
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
- "Overrides:" +
+ "Overrides:" +
"" +
"methodOverridenFromParent
in class " +
"" +
- "PrivateParent
"},
+ "PrivateParent
" + NL + ""},
// Should document that a method is specified by private interface.
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
- "Specified by:" +
+ "Specified by:" +
"" +
"methodInterface
in interface " +
"" +
- "PrivateInterface
" + NL + " "},
+ "PrivateInterface
" + NL + "" + NL + "
"},
// Method inheritence from non-public superinterface.
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
"Methods inherited from interface " +
@@ -209,12 +209,12 @@ public class TestPrivateClasses extends JavadocTester {
//Make sure implemented interfaces from private superclass are inherited
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html",
- "All Known Implementing Classes: All Known Implementing Classes: PrivateParent, " +
"PublicChild"},
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
- "All Implemented Interfaces: All Implemented Interfaces: PrivateInterface, " +
"" +
"PublicInterface"},
@@ -226,7 +226,7 @@ public class TestPrivateClasses extends JavadocTester {
"I
"},
{BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
- "Specified by:" +
+ "Specified by:" +
"hello
in interface I"},
};
diff --git a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
index d4f5294ba44..4c5d39bba1e 100644
--- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
+++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
@@ -41,39 +41,39 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
// Test for normal run of javadoc. The serialized-form.html should
// display the inline comments, tags and deprecation information if any.
private static final String[][] TEST_CMNT_DEPR = {
- {BUG_ID + FS + "serialized-form.html", "" + NL + "" + NL + NL +
- "- Throws:" + NL + "
" +
- "java.io.IOException
- See Also:" +
- "
- " +
- "
C1.setUndecorated(boolean)
" + NL +
- "
" + NL + "
"},
+ {BUG_ID + FS + "serialized-form.html", "" + NL + "" + NL +
+ "- Throws:
" + NL + "" +
+ "java.io.IOException
- See Also:" +
+ "
- " +
+ "
C1.setUndecorated(boolean)
" + NL +
+ " " + NL + "
"},
{BUG_ID + FS + "serialized-form.html", "" + NL +
- "- Deprecated. As of JDK version" +
- " 1.5, replaced by" + NL +
+ "
- Deprecated. As of JDK version " +
+ "1.5, replaced by" + NL +
" " +
- "
setUndecorated(boolean)
." +
+ "setUndecorated(boolean)
.
" +
"This field indicates whether the C1 is undecorated." + NL +
- "" + NL + "
" + NL +
- "- Since:
" + NL +
+ "" + NL + "
" + NL + " " + NL +
+ "" + NL + "- Since:
" + NL +
" - 1.4
" + NL + "- See Also:" +
- "
- " +
- "
C1.setUndecorated(boolean)
" + NL +
- ""},
+ "" +
+ "C1.setUndecorated(boolean)
" + NL +
+ " " + NL + ""},
{BUG_ID + FS + "serialized-form.html", "" + NL +
"- Deprecated. As of JDK version" +
" 1.5, replaced by" + NL +
" " +
"
setUndecorated(boolean)
." + NL + "" + NL +
- "
- Reads the object stream." + NL + "
" + NL +
- "
" + NL + NL + "- Throws:" +
- "" + NL + "
" +
- "IOException
" + NL +
- "java.io.IOException
" + NL +
- "
" + NL + "
"},
+ " Reads the object stream." + NL + "" + NL +
+ "
" + NL + "" + NL + "- Throws:" +
+ "
" + NL + "" +
+ "IOException
" + NL +
+ "java.io.IOException
" + NL +
+ " " + NL + ""},
{BUG_ID + FS + "serialized-form.html", "" + NL +
- "- Deprecated.
- " +
- "The name for this class." + NL + "
" + NL +
- "
-
" + NL + "
" + NL + "
"}};
+ "Deprecated. " +
+ "The name for this class." + NL + "" + NL + "
" + NL +
+ " " + NL + ""}};
// Test with -nocomment option. The serialized-form.html should
// not display the inline comments and tags but should display deprecation
@@ -83,16 +83,16 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
"undecorated" + NL + "" + NL + "- " +
"Deprecated. As of JDK version 1.5, replaced by" + NL +
"
" +
- "setUndecorated(boolean)
.
"},
+ "setUndecorated(boolean)
.
"},
{BUG_ID + FS + "serialized-form.html", "" + NL + "- " +
"Deprecated. As of JDK version" +
" 1.5, replaced by" + NL +
" " +
"
setUndecorated(boolean)
." + NL + "" + NL +
- "
"},
+ "
"},
{BUG_ID + FS + "serialized-form.html", "" + NL + "int " +
"publicKey
" + NL + "" + NL + "- " +
- "Deprecated.
"}};
+ "Deprecated.
"}};
// Test with -nodeprecated option. The serialized-form.html should
// ignore the -nodeprecated tag and display the deprecation info. This
diff --git a/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java b/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java
index bfae9a0e918..c8e99da5198 100644
--- a/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java
+++ b/langtools/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java
@@ -46,14 +46,14 @@ public class TestThrowsTag extends JavadocTester {
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "C.html",
- "T1
- the first throws tag." + NL +
- "T2
- the second throws tag." + NL +
- "T3
- the third throws tag." + NL +
- "T4
- the fourth throws tag." + NL +
- "T5
- the first inherited throws tag." + NL +
- "T6
- the second inherited throws tag." + NL +
- "T7
- the third inherited throws tag." + NL +
- "T8
- the fourth inherited throws tag."
+ "T1
- the first throws tag. " + NL +
+ "T2
- the second throws tag. " + NL +
+ "T3
- the third throws tag. " + NL +
+ "T4
- the fourth throws tag. " + NL +
+ "T5
- the first inherited throws tag. " + NL +
+ "T6
- the second inherited throws tag. " + NL +
+ "T7
- the third inherited throws tag. " + NL +
+ "T8
- the fourth inherited throws tag. "
},
};
private static final String[][] NEGATED_TEST = NO_TEST;