Fri, 11 Mar 2011 15:39:51 -0800
7006178: findbugs high priority issues in new javadoc
Reviewed-by: jjg
1 /*
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
26 package com.sun.tools.doclets.formats.html;
28 import java.io.*;
29 import java.util.*;
30 import com.sun.javadoc.*;
31 import com.sun.tools.doclets.internal.toolkit.util.*;
32 import com.sun.tools.doclets.formats.html.markup.*;
33 import com.sun.tools.doclets.internal.toolkit.*;
35 /**
36 * Generate class usage information.
37 *
38 * @author Robert G. Field
39 * @author Bhavesh Patel (Modified)
40 */
41 public class ClassUseWriter extends SubWriterHolderWriter {
43 final ClassDoc classdoc;
44 Set<PackageDoc> pkgToPackageAnnotations = null;
45 final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
46 final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
47 final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
48 final Map<String,List<ProgramElementDoc>> pkgToMethodArgTypeParameter;
49 final Map<String,List<ProgramElementDoc>> pkgToMethodReturnTypeParameter;
50 final Map<String,List<ProgramElementDoc>> pkgToMethodAnnotations;
51 final Map<String,List<ProgramElementDoc>> pkgToMethodParameterAnnotations;
52 final Map<String,List<ProgramElementDoc>> pkgToFieldTypeParameter;
53 final Map<String,List<ProgramElementDoc>> pkgToFieldAnnotations;
54 final Map<String,List<ProgramElementDoc>> pkgToSubclass;
55 final Map<String,List<ProgramElementDoc>> pkgToSubinterface;
56 final Map<String,List<ProgramElementDoc>> pkgToImplementingClass;
57 final Map<String,List<ProgramElementDoc>> pkgToField;
58 final Map<String,List<ProgramElementDoc>> pkgToMethodReturn;
59 final Map<String,List<ProgramElementDoc>> pkgToMethodArgs;
60 final Map<String,List<ProgramElementDoc>> pkgToMethodThrows;
61 final Map<String,List<ProgramElementDoc>> pkgToConstructorAnnotations;
62 final Map<String,List<ProgramElementDoc>> pkgToConstructorParameterAnnotations;
63 final Map<String,List<ProgramElementDoc>> pkgToConstructorArgs;
64 final Map<String,List<ProgramElementDoc>> pkgToConstructorArgTypeParameter;
65 final Map<String,List<ProgramElementDoc>> pkgToConstructorThrows;
66 final SortedSet<PackageDoc> pkgSet;
67 final MethodWriterImpl methodSubWriter;
68 final ConstructorWriterImpl constrSubWriter;
69 final FieldWriterImpl fieldSubWriter;
70 final NestedClassWriterImpl classSubWriter;
71 // Summary for various use tables.
72 final String classUseTableSummary;
73 final String subclassUseTableSummary;
74 final String subinterfaceUseTableSummary;
75 final String fieldUseTableSummary;
76 final String methodUseTableSummary;
77 final String constructorUseTableSummary;
80 /**
81 * Constructor.
82 *
83 * @param filename the file to be generated.
84 * @throws IOException
85 * @throws DocletAbortException
86 */
87 public ClassUseWriter(ConfigurationImpl configuration,
88 ClassUseMapper mapper, String path,
89 String filename, String relpath,
90 ClassDoc classdoc) throws IOException {
91 super(configuration, path, filename, relpath);
92 this.classdoc = classdoc;
93 if (mapper.classToPackageAnnotations.containsKey(classdoc.qualifiedName()))
94 pkgToPackageAnnotations = new HashSet<PackageDoc>(mapper.classToPackageAnnotations.get(classdoc.qualifiedName()));
95 configuration.currentcd = classdoc;
96 this.pkgSet = new TreeSet<PackageDoc>();
97 this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam);
98 this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations);
99 this.pkgToMethodTypeParameter = pkgDivide(mapper.classToExecMemberDocTypeParam);
100 this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToExecMemberDocArgTypeParam);
101 this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldDocTypeParam);
102 this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToFieldDoc);
103 this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToExecMemberDocReturnTypeParam);
104 this.pkgToMethodAnnotations = pkgDivide(mapper.classToExecMemberDocAnnotations);
105 this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToExecMemberDocParamAnnotation);
106 this.pkgToSubclass = pkgDivide(mapper.classToSubclass);
107 this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface);
108 this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass);
109 this.pkgToField = pkgDivide(mapper.classToField);
110 this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn);
111 this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs);
112 this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows);
113 this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations);
114 this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation);
115 this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs);
116 this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorDocArgTypeParam);
117 this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows);
118 //tmp test
119 if (pkgSet.size() > 0 &&
120 mapper.classToPackage.containsKey(classdoc.qualifiedName()) &&
121 !pkgSet.equals(mapper.classToPackage.get(classdoc.qualifiedName()))) {
122 configuration.root.printWarning("Internal error: package sets don't match: " + pkgSet + " with: " +
123 mapper.classToPackage.get(classdoc.qualifiedName()));
124 }
125 methodSubWriter = new MethodWriterImpl(this);
126 constrSubWriter = new ConstructorWriterImpl(this);
127 fieldSubWriter = new FieldWriterImpl(this);
128 classSubWriter = new NestedClassWriterImpl(this);
129 classUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
130 configuration.getText("doclet.classes"));
131 subclassUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
132 configuration.getText("doclet.subclasses"));
133 subinterfaceUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
134 configuration.getText("doclet.subinterfaces"));
135 fieldUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
136 configuration.getText("doclet.fields"));
137 methodUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
138 configuration.getText("doclet.methods"));
139 constructorUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
140 configuration.getText("doclet.constructors"));
141 }
143 /**
144 * Write out class use pages.
145 * @throws DocletAbortException
146 */
147 public static void generate(ConfigurationImpl configuration,
148 ClassTree classtree) {
149 ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree);
150 ClassDoc[] classes = configuration.root.classes();
151 for (int i = 0; i < classes.length; i++) {
152 ClassUseWriter.generate(configuration, mapper, classes[i]);
153 }
154 PackageDoc[] pkgs = configuration.packages;
155 for (int i = 0; i < pkgs.length; i++) {
156 PackageUseWriter.generate(configuration, mapper, pkgs[i]);
157 }
158 }
160 private Map<String,List<ProgramElementDoc>> pkgDivide(Map<String,? extends List<? extends ProgramElementDoc>> classMap) {
161 Map<String,List<ProgramElementDoc>> map = new HashMap<String,List<ProgramElementDoc>>();
162 List<? extends ProgramElementDoc> list= classMap.get(classdoc.qualifiedName());
163 if (list != null) {
164 Collections.sort(list);
165 Iterator<? extends ProgramElementDoc> it = list.iterator();
166 while (it.hasNext()) {
167 ProgramElementDoc doc = it.next();
168 PackageDoc pkg = doc.containingPackage();
169 pkgSet.add(pkg);
170 List<ProgramElementDoc> inPkg = map.get(pkg.name());
171 if (inPkg == null) {
172 inPkg = new ArrayList<ProgramElementDoc>();
173 map.put(pkg.name(), inPkg);
174 }
175 inPkg.add(doc);
176 }
177 }
178 return map;
179 }
181 /**
182 * Generate a class page.
183 */
184 public static void generate(ConfigurationImpl configuration,
185 ClassUseMapper mapper, ClassDoc classdoc) {
186 ClassUseWriter clsgen;
187 String path = DirectoryManager.getDirectoryPath(classdoc.
188 containingPackage());
189 if (path.length() > 0) {
190 path += File.separator;
191 }
192 path += "class-use";
193 String filename = classdoc.name() + ".html";
194 String pkgname = classdoc.containingPackage().name();
195 pkgname += (pkgname.length() > 0)? ".class-use": "class-use";
196 String relpath = DirectoryManager.getRelativePath(pkgname);
197 try {
198 clsgen = new ClassUseWriter(configuration,
199 mapper, path, filename,
200 relpath, classdoc);
201 clsgen.generateClassUseFile();
202 clsgen.close();
203 } catch (IOException exc) {
204 configuration.standardmessage.
205 error("doclet.exception_encountered",
206 exc.toString(), filename);
207 throw new DocletAbortException();
208 }
209 }
211 /**
212 * Generate the class use list.
213 */
214 protected void generateClassUseFile() throws IOException {
215 Content body = getClassUseHeader();
216 HtmlTree div = new HtmlTree(HtmlTag.DIV);
217 div.addStyle(HtmlStyle.classUseContainer);
218 if (pkgSet.size() > 0) {
219 addClassUse(div);
220 } else {
221 div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
222 classdoc.qualifiedName()));
223 }
224 body.addContent(div);
225 addNavLinks(false, body);
226 addBottom(body);
227 printHtmlDocument(null, true, body);
228 }
230 /**
231 * Add the class use documentation.
232 *
233 * @param contentTree the content tree to which the class use information will be added
234 */
235 protected void addClassUse(Content contentTree) throws IOException {
236 HtmlTree ul = new HtmlTree(HtmlTag.UL);
237 ul.addStyle(HtmlStyle.blockList);
238 if (configuration.packages.length > 1) {
239 addPackageList(ul);
240 addPackageAnnotationList(ul);
241 }
242 addClassList(ul);
243 contentTree.addContent(ul);
244 }
246 /**
247 * Add the packages list that use the given class.
248 *
249 * @param contentTree the content tree to which the packages list will be added
250 */
251 protected void addPackageList(Content contentTree) throws IOException {
252 Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
253 getTableCaption(configuration().getText(
254 "doclet.ClassUse_Packages.that.use.0",
255 getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
256 false)))));
257 table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
258 Content tbody = new HtmlTree(HtmlTag.TBODY);
259 Iterator<PackageDoc> it = pkgSet.iterator();
260 for (int i = 0; it.hasNext(); i++) {
261 PackageDoc pkg = it.next();
262 HtmlTree tr = new HtmlTree(HtmlTag.TR);
263 if (i % 2 == 0) {
264 tr.addStyle(HtmlStyle.altColor);
265 } else {
266 tr.addStyle(HtmlStyle.rowColor);
267 }
268 addPackageUse(pkg, tr);
269 tbody.addContent(tr);
270 }
271 table.addContent(tbody);
272 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
273 contentTree.addContent(li);
274 }
276 /**
277 * Add the package annotation list.
278 *
279 * @param contentTree the content tree to which the package annotation list will be added
280 */
281 protected void addPackageAnnotationList(Content contentTree) throws IOException {
282 if ((!classdoc.isAnnotationType()) ||
283 pkgToPackageAnnotations == null ||
284 pkgToPackageAnnotations.size() == 0) {
285 return;
286 }
287 Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
288 getTableCaption(configuration().getText(
289 "doclet.ClassUse_PackageAnnotation",
290 getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
291 false)))));
292 table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
293 Content tbody = new HtmlTree(HtmlTag.TBODY);
294 Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
295 for (int i = 0; it.hasNext(); i++) {
296 PackageDoc pkg = it.next();
297 HtmlTree tr = new HtmlTree(HtmlTag.TR);
298 if (i % 2 == 0) {
299 tr.addStyle(HtmlStyle.altColor);
300 } else {
301 tr.addStyle(HtmlStyle.rowColor);
302 }
303 Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
304 getPackageLink(pkg, new StringContent(pkg.name())));
305 tr.addContent(tdFirst);
306 HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
307 tdLast.addStyle(HtmlStyle.colLast);
308 addSummaryComment(pkg, tdLast);
309 tr.addContent(tdLast);
310 tbody.addContent(tr);
311 }
312 table.addContent(tbody);
313 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
314 contentTree.addContent(li);
315 }
317 /**
318 * Add the class list that use the given class.
319 *
320 * @param contentTree the content tree to which the class list will be added
321 */
322 protected void addClassList(Content contentTree) throws IOException {
323 HtmlTree ul = new HtmlTree(HtmlTag.UL);
324 ul.addStyle(HtmlStyle.blockList);
325 for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
326 PackageDoc pkg = it.next();
327 Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name()));
328 Content link = new RawHtml(
329 configuration.getText("doclet.ClassUse_Uses.of.0.in.1",
330 getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER,
331 classdoc, false)),
332 getPackageLinkString(pkg, Util.getPackageName(pkg), false)));
333 Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
334 li.addContent(heading);
335 addClassUse(pkg, li);
336 ul.addContent(li);
337 }
338 Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
339 contentTree.addContent(li);
340 }
342 /**
343 * Add the package use information.
344 *
345 * @param pkg the package that uses the given class
346 * @param contentTree the content tree to which the package use information will be added
347 */
348 protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException {
349 Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
350 getHyperLink("", pkg.name(), new StringContent(Util.getPackageName(pkg))));
351 contentTree.addContent(tdFirst);
352 HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
353 tdLast.addStyle(HtmlStyle.colLast);
354 addSummaryComment(pkg, tdLast);
355 contentTree.addContent(tdLast);
356 }
358 /**
359 * Add the class use information.
360 *
361 * @param pkg the package that uses the given class
362 * @param contentTree the content tree to which the class use information will be added
363 */
364 protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException {
365 String classLink = getLink(new LinkInfoImpl(
366 LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false));
367 String pkgLink = getPackageLinkString(pkg, Util.getPackageName(pkg), false);
368 classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()),
369 configuration.getText("doclet.ClassUse_Annotation", classLink,
370 pkgLink), classUseTableSummary, contentTree);
371 classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()),
372 configuration.getText("doclet.ClassUse_TypeParameter", classLink,
373 pkgLink), classUseTableSummary, contentTree);
374 classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()),
375 configuration.getText("doclet.ClassUse_Subclass", classLink,
376 pkgLink), subclassUseTableSummary, contentTree);
377 classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()),
378 configuration.getText("doclet.ClassUse_Subinterface", classLink,
379 pkgLink), subinterfaceUseTableSummary, contentTree);
380 classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()),
381 configuration.getText("doclet.ClassUse_ImplementingClass", classLink,
382 pkgLink), classUseTableSummary, contentTree);
383 fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()),
384 configuration.getText("doclet.ClassUse_Field", classLink,
385 pkgLink), fieldUseTableSummary, contentTree);
386 fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()),
387 configuration.getText("doclet.ClassUse_FieldAnnotations", classLink,
388 pkgLink), fieldUseTableSummary, contentTree);
389 fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
390 configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink,
391 pkgLink), fieldUseTableSummary, contentTree);
392 methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()),
393 configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
394 pkgLink), methodUseTableSummary, contentTree);
395 methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
396 configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
397 pkgLink), methodUseTableSummary, contentTree);
398 methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
399 configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
400 pkgLink), methodUseTableSummary, contentTree);
401 methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()),
402 configuration.getText("doclet.ClassUse_MethodReturn", classLink,
403 pkgLink), methodUseTableSummary, contentTree);
404 methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
405 configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
406 pkgLink), methodUseTableSummary, contentTree);
407 methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()),
408 configuration.getText("doclet.ClassUse_MethodArgs", classLink,
409 pkgLink), methodUseTableSummary, contentTree);
410 methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
411 configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink,
412 pkgLink), methodUseTableSummary, contentTree);
413 methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()),
414 configuration.getText("doclet.ClassUse_MethodThrows", classLink,
415 pkgLink), methodUseTableSummary, contentTree);
416 constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
417 configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink,
418 pkgLink), constructorUseTableSummary, contentTree);
419 constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
420 configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
421 pkgLink), constructorUseTableSummary, contentTree);
422 constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()),
423 configuration.getText("doclet.ClassUse_ConstructorArgs", classLink,
424 pkgLink), constructorUseTableSummary, contentTree);
425 constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
426 configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
427 pkgLink), constructorUseTableSummary, contentTree);
428 constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()),
429 configuration.getText("doclet.ClassUse_ConstructorThrows", classLink,
430 pkgLink), constructorUseTableSummary, contentTree);
431 }
433 /**
434 * Get the header for the class use Listing.
435 *
436 * @return a content tree representing the class use header
437 */
438 protected Content getClassUseHeader() {
439 String cltype = configuration.getText(classdoc.isInterface()?
440 "doclet.Interface":"doclet.Class");
441 String clname = classdoc.qualifiedName();
442 String title = configuration.getText("doclet.Window_ClassUse_Header",
443 cltype, clname);
444 Content bodyTree = getBody(true, getWindowTitle(title));
445 addTop(bodyTree);
446 addNavLinks(true, bodyTree);
447 Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
448 Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
449 true, HtmlStyle.title, headContent);
450 Content div = HtmlTree.DIV(HtmlStyle.header, heading);
451 bodyTree.addContent(div);
452 return bodyTree;
453 }
455 /**
456 * Get this package link.
457 *
458 * @return a content tree for the package link
459 */
460 protected Content getNavLinkPackage() {
461 Content linkContent = getHyperLink("../package-summary.html", "",
462 packageLabel);
463 Content li = HtmlTree.LI(linkContent);
464 return li;
465 }
467 /**
468 * Get class page link.
469 *
470 * @return a content tree for the class page link
471 */
472 protected Content getNavLinkClass() {
473 Content linkContent = new RawHtml(getLink(new LinkInfoImpl(
474 LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, "",
475 configuration.getText("doclet.Class"), false)));
476 Content li = HtmlTree.LI(linkContent);
477 return li;
478 }
480 /**
481 * Get the use link.
482 *
483 * @return a content tree for the use link
484 */
485 protected Content getNavLinkClassUse() {
486 Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
487 return li;
488 }
490 /**
491 * Get the tree link.
492 *
493 * @return a content tree for the tree link
494 */
495 protected Content getNavLinkTree() {
496 Content linkContent = classdoc.containingPackage().isIncluded() ?
497 getHyperLink("../package-tree.html", "", treeLabel) :
498 getHyperLink(relativePath + "overview-tree.html", "", treeLabel);
499 Content li = HtmlTree.LI(linkContent);
500 return li;
501 }
502 }