414 |
"package-summary" + filenameExtension), |
"package-summary" + filenameExtension), |
415 |
pathToRoot, |
pathToRoot, |
416 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
417 |
output.beginPage(packageDoc.name(), getOutputCharset()); |
output.beginPage(getPageTitle(packageDoc.name()), getOutputCharset()); |
418 |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE); |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE); |
419 |
printNavBarTop(output, "package"); |
printNavBarTop(output, "package"); |
420 |
|
|
617 |
"tree" + filenameExtension), |
"tree" + filenameExtension), |
618 |
pathToRoot, |
pathToRoot, |
619 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
620 |
output.beginPage(packageDoc.name() + " Hierarchy", getOutputCharset()); |
output.beginPage(getPageTitle(packageDoc.name() + " Hierarchy"), getOutputCharset()); |
621 |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE_TREE); |
output.beginBody(CssClass.BODY_CONTENT_PACKAGE_TREE); |
622 |
printNavBarTop(output, "package-tree"); |
printNavBarTop(output, "package-tree"); |
623 |
|
|
640 |
"tree" + filenameExtension), |
"tree" + filenameExtension), |
641 |
".", |
".", |
642 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
643 |
output.beginPage("Hierarchy", getOutputCharset()); |
output.beginPage(getPageTitle("Hierarchy"), getOutputCharset()); |
644 |
output.beginBody(CssClass.BODY_CONTENT_FULL_TREE); |
output.beginBody(CssClass.BODY_CONTENT_FULL_TREE); |
645 |
printNavBarTop(output, "full-tree"); |
printNavBarTop(output, "full-tree"); |
646 |
|
|
781 |
"all-packages" + filenameExtension), |
"all-packages" + filenameExtension), |
782 |
".", |
".", |
783 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
784 |
output.beginPage("Package Menu", getOutputCharset()); |
output.beginPage(getPageTitle("Package Menu"), getOutputCharset()); |
785 |
output.beginBody(CssClass.BODY_MENU_PACKAGES, false); |
output.beginBody(CssClass.BODY_MENU_PACKAGES, false); |
786 |
|
|
787 |
output.beginSpan(CssClass.PACKAGE_MENU_ENTRY); |
output.beginSpan(CssClass.PACKAGE_MENU_ENTRY); |
901 |
"all-classes" + filenameExtension), |
"all-classes" + filenameExtension), |
902 |
".", |
".", |
903 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
904 |
output.beginPage("Class Menu", getOutputCharset()); |
output.beginPage(getPageTitle("Class Menu"), getOutputCharset()); |
905 |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
906 |
|
|
907 |
output.div(CssClass.CLASS_MENU_TITLE, "All Classes"); |
output.div(CssClass.CLASS_MENU_TITLE, "All Classes"); |
921 |
pathToRoot, |
pathToRoot, |
922 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
923 |
|
|
924 |
output.beginPage(packageDoc.name() + " Class Menu", getOutputCharset()); |
output.beginPage(getPageTitle(packageDoc.name() + " Class Menu"), getOutputCharset()); |
925 |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
output.beginBody(CssClass.BODY_MENU_CLASSES, false); |
926 |
|
|
927 |
output.beginDiv(CssClass.CLASS_MENU_TITLE); |
output.beginDiv(CssClass.CLASS_MENU_TITLE); |
972 |
pageName + filenameExtension), |
pageName + filenameExtension), |
973 |
".", |
".", |
974 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
975 |
output.beginPage("Alphabetical Index", getOutputCharset()); |
output.beginPage(getPageTitle("Alphabetical Index"), getOutputCharset()); |
976 |
output.beginBody(CssClass.BODY_CONTENT_INDEX); |
output.beginBody(CssClass.BODY_CONTENT_INDEX); |
977 |
printNavBarTop(output, "index"); |
printNavBarTop(output, "index"); |
978 |
|
|
1079 |
} |
} |
1080 |
} |
} |
1081 |
|
|
1082 |
|
|
1083 |
|
private void printSerializationPage() |
1084 |
|
throws IOException |
1085 |
|
{ |
1086 |
|
HtmlPage output = new HtmlPage(new File(getTargetDirectory(), |
1087 |
|
"serialized-form" + filenameExtension), |
1088 |
|
".", |
1089 |
|
getOutputDocEncoding()); |
1090 |
|
output.beginPage(getPageTitle("Serialized Form"), getOutputCharset()); |
1091 |
|
output.beginBody(CssClass.BODY_CONTENT_DEPRECATED); |
1092 |
|
printNavBarTop(output, "serialized"); |
1093 |
|
|
1094 |
|
output.div(CssClass.SERIALIZED_TITLE, "Serialized Form"); |
1095 |
|
|
1096 |
|
Iterator it = getAllPackages().iterator(); |
1097 |
|
|
1098 |
|
while (it.hasNext()) { |
1099 |
|
|
1100 |
|
PackageDoc packageDoc = (PackageDoc)it.next(); |
1101 |
|
|
1102 |
|
List serializableClasses = new LinkedList(); |
1103 |
|
ClassDoc[] classes = packageDoc.allClasses(); |
1104 |
|
for (int i=0; i<classes.length; ++i) { |
1105 |
|
ClassDoc classDoc = classes[i]; |
1106 |
|
if (classDoc.isSerializable() || classDoc.isExternalizable()) { |
1107 |
|
serializableClasses.add(classDoc); |
1108 |
|
} |
1109 |
|
} |
1110 |
|
|
1111 |
|
if (!serializableClasses.isEmpty()) { |
1112 |
|
output.div(CssClass.SERIALIZED_PACKAGE_HEADER, "Package " + packageDoc.name()); |
1113 |
|
|
1114 |
|
Iterator cit = serializableClasses.iterator(); |
1115 |
|
while (cit.hasNext()) { |
1116 |
|
ClassDoc classDoc = (ClassDoc)cit.next(); |
1117 |
|
|
1118 |
|
output.anchorName(classDoc.qualifiedTypeName()); |
1119 |
|
|
1120 |
|
output.beginDiv(CssClass.SERIALIZED_CLASS_HEADER); |
1121 |
|
output.print("Class "); |
1122 |
|
printType(output, classDoc, true); |
1123 |
|
output.print(" extends "); |
1124 |
|
printType(output, classDoc.superclass()); |
1125 |
|
output.print(" implements Serializable"); |
1126 |
|
output.endDiv(CssClass.SERIALIZED_CLASS_HEADER); |
1127 |
|
|
1128 |
|
FieldDoc serialVersionUidField = findField(classDoc, "serialVersionUID"); |
1129 |
|
if (null != serialVersionUidField |
1130 |
|
&& serialVersionUidField.isFinal() |
1131 |
|
&& serialVersionUidField.isStatic() |
1132 |
|
&& serialVersionUidField.type().typeName().equals("long")) { |
1133 |
|
|
1134 |
|
String fieldValue = serialVersionUidField.constantValueExpression(); |
1135 |
|
if (null != fieldValue) { |
1136 |
|
output.beginDiv(CssClass.SERIALIZED_SVUID_OUTER); |
1137 |
|
output.span(CssClass.SERIALIZED_SVUID_HEADER, "serialVersionUID: "); |
1138 |
|
output.span(CssClass.SERIALIZED_SVUID_VALUE, fieldValue); |
1139 |
|
output.endDiv(CssClass.SERIALIZED_SVUID_OUTER); |
1140 |
|
} |
1141 |
|
} |
1142 |
|
printMemberDetails(output, |
1143 |
|
classDoc.serializationMethods(), |
1144 |
|
"Serialization Methods", |
1145 |
|
true); |
1146 |
|
printMemberDetails(output, |
1147 |
|
classDoc.serializableFields(), |
1148 |
|
"Serialized Fields", |
1149 |
|
true); |
1150 |
|
} |
1151 |
|
} |
1152 |
|
} |
1153 |
|
|
1154 |
|
printNavBarBottom(output, "serialized"); |
1155 |
|
|
1156 |
|
output.endBody(); |
1157 |
|
output.endPage(); |
1158 |
|
output.close(); |
1159 |
|
} |
1160 |
|
|
1161 |
|
|
1162 |
private void printDeprecationPage() |
private void printDeprecationPage() |
1163 |
throws IOException |
throws IOException |
1164 |
{ |
{ |
1166 |
"deprecated" + filenameExtension), |
"deprecated" + filenameExtension), |
1167 |
".", |
".", |
1168 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1169 |
output.beginPage("Deprecated API", getOutputCharset()); |
output.beginPage(getPageTitle("Deprecated API"), getOutputCharset()); |
1170 |
output.beginBody(CssClass.BODY_CONTENT_DEPRECATED); |
output.beginBody(CssClass.BODY_CONTENT_DEPRECATED); |
1171 |
printNavBarTop(output, "deprecated"); |
printNavBarTop(output, "deprecated"); |
1172 |
|
|
1298 |
"about" + filenameExtension), |
"about" + filenameExtension), |
1299 |
".", |
".", |
1300 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1301 |
output.beginPage("About", getOutputCharset()); |
output.beginPage(getPageTitle("About"), getOutputCharset()); |
1302 |
output.beginBody(CssClass.BODY_CONTENT_ABOUT); |
output.beginBody(CssClass.BODY_CONTENT_ABOUT); |
1303 |
|
|
1304 |
printNavBarTop(output, "about"); |
printNavBarTop(output, "about"); |
1324 |
"help" + filenameExtension), |
"help" + filenameExtension), |
1325 |
".", |
".", |
1326 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1327 |
output.beginPage("Help", getOutputCharset()); |
output.beginPage(getPageTitle("Help"), getOutputCharset()); |
1328 |
output.beginBody(CssClass.BODY_CONTENT_HELP); |
output.beginBody(CssClass.BODY_CONTENT_HELP); |
1329 |
|
|
1330 |
printNavBarTop(output, "help"); |
printNavBarTop(output, "help"); |
1452 |
classDoc.name() + "-uses" + filenameExtension), |
classDoc.name() + "-uses" + filenameExtension), |
1453 |
pathToRoot, |
pathToRoot, |
1454 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1455 |
output.beginPage(classDoc.name(), getOutputCharset()); |
output.beginPage(getPageTitle(classDoc.name()), getOutputCharset()); |
1456 |
output.beginBody(CssClass.BODY_CONTENT_USES); |
output.beginBody(CssClass.BODY_CONTENT_USES); |
1457 |
printNavBarTop(output, "uses", classDoc); |
printNavBarTop(output, "uses", classDoc); |
1458 |
|
|
1606 |
classDoc.name() + filenameExtension), |
classDoc.name() + filenameExtension), |
1607 |
pathToRoot, |
pathToRoot, |
1608 |
getOutputDocEncoding()); |
getOutputDocEncoding()); |
1609 |
output.beginPage(classDoc.name(), getOutputCharset()); |
output.beginPage(getPageTitle(classDoc.name()), getOutputCharset()); |
1610 |
output.beginBody(CssClass.BODY_CONTENT_CLASS); |
output.beginBody(CssClass.BODY_CONTENT_CLASS); |
1611 |
printNavBarTop(output, "class", classDoc); |
printNavBarTop(output, "class", classDoc); |
1612 |
|
|
1752 |
printTags(output, classDoc, classDoc.inlineTags(), false); |
printTags(output, classDoc, classDoc.inlineTags(), false); |
1753 |
output.endDiv(CssClass.CLASS_DESCRIPTION); |
output.endDiv(CssClass.CLASS_DESCRIPTION); |
1754 |
|
|
1755 |
printTaglets(output, classDoc.tags(), new HtmlTagletContext(classDoc, output)); |
printTaglets(output, classDoc.tags(), new HtmlTagletContext(classDoc, output, false)); |
1756 |
} |
} |
1757 |
|
|
1758 |
printProgramElementDocs(output, getSortedInnerClasses(classDoc), |
printProgramElementDocs(output, getSortedInnerClasses(classDoc), |
1783 |
} |
} |
1784 |
} |
} |
1785 |
|
|
1786 |
printMemberDetails(output, classDoc.fields(), |
printMemberDetails(output, getSortedFields(classDoc), |
1787 |
"Field Details"); |
"Field Details", false); |
1788 |
printMemberDetails(output, classDoc.constructors(), |
printMemberDetails(output, getSortedConstructors(classDoc), |
1789 |
"Constructor Details"); |
"Constructor Details", false); |
1790 |
printMemberDetails(output, classDoc.methods(), |
printMemberDetails(output, getSortedMethods(classDoc), |
1791 |
"Method Details"); |
"Method Details", false); |
1792 |
|
|
1793 |
printNavBarBottom(output, "class", classDoc); |
printNavBarBottom(output, "class", classDoc); |
1794 |
|
|
1847 |
} |
} |
1848 |
|
|
1849 |
private void printMemberDetails(HtmlPage output, |
private void printMemberDetails(HtmlPage output, |
1850 |
ProgramElementDoc[] memberDocs, String header) |
ProgramElementDoc[] memberDocs, String header, |
1851 |
|
boolean isOnSerializedPage) |
1852 |
{ |
{ |
1853 |
if (memberDocs.length > 0) { |
if (memberDocs.length > 0) { |
1854 |
output.div(CssClass.SECTION_HEADER, header); |
CssClass sectionClass; |
1855 |
|
if (isOnSerializedPage) { |
1856 |
|
sectionClass = CssClass.SERIALIZED_SECTION_HEADER; |
1857 |
|
} |
1858 |
|
else { |
1859 |
|
sectionClass = CssClass.SECTION_HEADER; |
1860 |
|
} |
1861 |
|
output.div(sectionClass, header); |
1862 |
|
|
1863 |
for (int i=0; i<memberDocs.length; ++i) { |
for (int i=0; i<memberDocs.length; ++i) { |
1864 |
if (i>0) { |
if (i>0) { |
1873 |
output.div(CssClass.MEMBER_DETAIL_NAME, memberDoc.name()); |
output.div(CssClass.MEMBER_DETAIL_NAME, memberDoc.name()); |
1874 |
|
|
1875 |
output.beginDiv(CssClass.MEMBER_DETAIL_SYNOPSIS); |
output.beginDiv(CssClass.MEMBER_DETAIL_SYNOPSIS); |
1876 |
output.print(getFullModifiers(memberDoc)); |
if (!isOnSerializedPage || !memberDoc.isField()) { |
1877 |
|
output.print(getFullModifiers(memberDoc)); |
1878 |
|
} |
1879 |
if (memberDoc.isMethod()) { |
if (memberDoc.isMethod()) { |
1880 |
output.print(" "); |
output.print(" "); |
1881 |
printType(output, ((MethodDoc)memberDoc).returnType()); |
printType(output, ((MethodDoc)memberDoc).returnType()); |
1945 |
} |
} |
1946 |
} |
} |
1947 |
|
|
1948 |
if (!specifyingInterfaces.isEmpty()) { |
if (!specifyingInterfaces.isEmpty() |
1949 |
|
&& !isOnSerializedPage) { |
1950 |
output.beginDiv(CssClass.MEMBER_DETAIL_SPECIFIED_BY_LIST); |
output.beginDiv(CssClass.MEMBER_DETAIL_SPECIFIED_BY_LIST); |
1951 |
output.div(CssClass.MEMBER_DETAIL_SPECIFIED_BY_HEADER, "Specified by:"); |
output.div(CssClass.MEMBER_DETAIL_SPECIFIED_BY_HEADER, "Specified by:"); |
1952 |
Iterator it = specifyingInterfaces.iterator(); |
Iterator it = specifyingInterfaces.iterator(); |
2101 |
} |
} |
2102 |
} |
} |
2103 |
|
|
2104 |
TagletContext context = new HtmlTagletContext(memberDoc, output); |
TagletContext context = new HtmlTagletContext(memberDoc, output, isOnSerializedPage); |
2105 |
printTaglets(output, memberDoc.tags(), context); |
printTaglets(output, memberDoc.tags(), context); |
2106 |
} |
} |
2107 |
|
|
2203 |
boolean inline, |
boolean inline, |
2204 |
Doc contextDoc) |
Doc contextDoc) |
2205 |
{ |
{ |
2206 |
TagletContext context = new HtmlTagletContext(contextDoc, output); |
TagletContext context = new HtmlTagletContext(contextDoc, output, false); |
2207 |
if (firstSentence) { |
if (firstSentence) { |
2208 |
output.print(renderInlineTags(tag.firstSentenceTags(), context)); |
output.print(renderInlineTags(tag.firstSentenceTags(), context)); |
2209 |
} |
} |
2219 |
|
|
2220 |
private void printTags(HtmlPage output, Doc contextDoc, Tag[] tags, boolean firstSentence, boolean inline) |
private void printTags(HtmlPage output, Doc contextDoc, Tag[] tags, boolean firstSentence, boolean inline) |
2221 |
{ |
{ |
2222 |
output.print(renderInlineTags(tags, new HtmlTagletContext(contextDoc, output))); |
output.print(renderInlineTags(tags, new HtmlTagletContext(contextDoc, output, false))); |
2223 |
/* |
/* |
2224 |
if (!optionNoComment.getValue()) { |
if (!optionNoComment.getValue()) { |
2225 |
output.print(renderInlineTags(tag.firstSentenceTags(), output)); |
output.print(renderInlineTags(tag.firstSentenceTags(), output)); |
2306 |
output.print(asClassDoc.name()); |
output.print(asClassDoc.name()); |
2307 |
output.endAnchor(); |
output.endAnchor(); |
2308 |
} |
} |
|
output.print(asClassDoc.dimension()); |
|
2309 |
} |
} |
2310 |
else { |
else { |
2311 |
output.print(possiblyQualifiedName(type)); |
output.print(possiblyQualifiedName(type)); |
2312 |
} |
} |
2313 |
|
output.print(type.dimension()); |
2314 |
} |
} |
2315 |
|
|
2316 |
private void printTaglets(final HtmlPage output, Tag[] tags, TagletContext context) |
private void printTaglets(final HtmlPage output, Tag[] tags, TagletContext context) |
2447 |
printDeprecationPage(); |
printDeprecationPage(); |
2448 |
} |
} |
2449 |
|
|
2450 |
|
printSerializationPage(); |
2451 |
|
|
2452 |
Collection packageDocs = getAllPackages(); |
Collection packageDocs = getAllPackages(); |
2453 |
Iterator it = packageDocs.iterator(); |
Iterator it = packageDocs.iterator(); |
2454 |
while (it.hasNext()) { |
while (it.hasNext()) { |
2811 |
classDoc = ((MemberDoc)doc).containingClass(); |
classDoc = ((MemberDoc)doc).containingClass(); |
2812 |
} |
} |
2813 |
|
|
2814 |
if (null == referencedMember || seeTag.referencedClass() != classDoc) { |
if (null == referencedMember |
2815 |
|
|| seeTag.referencedClass() != classDoc |
2816 |
|
|| ((HtmlTagletContext)context).isOnSerializedPage()) { |
2817 |
|
|
2818 |
if (!seeTag.referencedClass().isIncluded()) { |
if (!seeTag.referencedClass().isIncluded()) { |
2819 |
label = possiblyQualifiedName(seeTag.referencedClass()); |
label = possiblyQualifiedName(seeTag.referencedClass()); |
2886 |
|
|
2887 |
protected String renderTag(String tagName, Tag[] tags, TagletContext context) |
protected String renderTag(String tagName, Tag[] tags, TagletContext context) |
2888 |
{ |
{ |
2889 |
if (tags.length > 0 && "see".equals(tagName)) { |
Doc doc = context.getDoc(); |
2890 |
|
|
2891 |
|
if ("see".equals(tagName) |
2892 |
|
&& ((tags.length > 0) |
2893 |
|
|| (doc.isClass() |
2894 |
|
&& (((ClassDoc)doc).isSerializable() |
2895 |
|
|| ((ClassDoc)doc).isExternalizable())))) { |
2896 |
|
|
2897 |
StringBuffer result = new StringBuffer(); |
StringBuffer result = new StringBuffer(); |
2898 |
result.append("<dl class=\"tag list\">"); |
result.append("<dl class=\"tag list\">"); |
2899 |
result.append("<dt class=\"tag section header\"><b>"); |
result.append("<dt class=\"tag section header\"><b>"); |
2900 |
result.append("See Also:"); |
result.append("See Also:"); |
2901 |
result.append("</b></dt>"); |
result.append("</b></dt>"); |
2902 |
|
|
|
Doc doc = context.getDoc(); |
|
2903 |
boolean oneLine = true; |
boolean oneLine = true; |
2904 |
|
|
2905 |
if (oneLine) { |
if (oneLine) { |
2920 |
result.append("</dd>"); |
result.append("</dd>"); |
2921 |
} |
} |
2922 |
} |
} |
2923 |
|
|
2924 |
|
if ((doc instanceof ClassDoc) |
2925 |
|
&& (((ClassDoc)doc).isSerializable() || ((ClassDoc)doc).isExternalizable())) { |
2926 |
|
if (tags.length > 0) { |
2927 |
|
result.append(", "); |
2928 |
|
} |
2929 |
|
HtmlPage output = ((HtmlTagletContext)context).getOutput(); |
2930 |
|
result.append("<a href=\"" + output.getPathToRoot() + "/serialized-form" + filenameExtension + "#" + ((ClassDoc)doc).qualifiedName() + "\">Serialized Form</a>"); |
2931 |
|
} |
2932 |
|
|
2933 |
if (oneLine) { |
if (oneLine) { |
2934 |
result.append("<dd>"); |
result.append("<dd>"); |
2935 |
} |
} |
2936 |
result.append("</dl>"); |
result.append("</dl>"); |
2937 |
return result.toString(); |
return result.toString(); |
2938 |
} |
} |
2939 |
|
else if (tags.length > 0 |
2940 |
|
&& "serial".equals(tagName) |
2941 |
|
&& ((HtmlTagletContext)context).isOnSerializedPage()) { |
2942 |
|
|
2943 |
|
return renderInlineTags(tags[0].inlineTags(), context); |
2944 |
|
} |
2945 |
else { |
else { |
2946 |
return ""; |
return ""; |
2947 |
} |
} |
2956 |
return optionWindowTitle.getValue(); |
return optionWindowTitle.getValue(); |
2957 |
} |
} |
2958 |
} |
} |
2959 |
|
|
2960 |
|
private String getPageTitle(String title) |
2961 |
|
{ |
2962 |
|
if (null == optionWindowTitle.getValue()) { |
2963 |
|
return title; |
2964 |
|
} |
2965 |
|
else { |
2966 |
|
return title + " (" + optionWindowTitle.getValue() + ")"; |
2967 |
|
} |
2968 |
|
} |
2969 |
} |
} |