Thu, 15 Nov 2012 19:54:20 -0800
8002079: update DocFile to use a JavaFileManager
Reviewed-by: darcy
1 /*
2 * Copyright (c) 1998, 2012, 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.*;
31 import com.sun.javadoc.*;
32 import com.sun.tools.doclets.formats.html.markup.*;
33 import com.sun.tools.doclets.internal.toolkit.*;
34 import com.sun.tools.doclets.internal.toolkit.util.*;
36 /**
37 * Generate class usage information.
38 *
39 * <p><b>This is NOT part of any supported API.
40 * If you write code that depends on this, you do so at your own risk.
41 * This code and its internal interfaces are subject to change or
42 * deletion without notice.</b>
43 *
44 * @author Robert G. Field
45 * @author Bhavesh Patel (Modified)
46 */
47 public class ClassUseWriter extends SubWriterHolderWriter {
49 final ClassDoc classdoc;
50 Set<PackageDoc> pkgToPackageAnnotations = null;
51 final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
52 final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
53 final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
54 final Map<String,List<ProgramElementDoc>> pkgToMethodArgTypeParameter;
55 final Map<String,List<ProgramElementDoc>> pkgToMethodReturnTypeParameter;
56 final Map<String,List<ProgramElementDoc>> pkgToMethodAnnotations;
57 final Map<String,List<ProgramElementDoc>> pkgToMethodParameterAnnotations;
58 final Map<String,List<ProgramElementDoc>> pkgToFieldTypeParameter;
59 final Map<String,List<ProgramElementDoc>> pkgToFieldAnnotations;
60 final Map<String,List<ProgramElementDoc>> pkgToSubclass;
61 final Map<String,List<ProgramElementDoc>> pkgToSubinterface;
62 final Map<String,List<ProgramElementDoc>> pkgToImplementingClass;
63 final Map<String,List<ProgramElementDoc>> pkgToField;
64 final Map<String,List<ProgramElementDoc>> pkgToMethodReturn;
65 final Map<String,List<ProgramElementDoc>> pkgToMethodArgs;
66 final Map<String,List<ProgramElementDoc>> pkgToMethodThrows;
67 final Map<String,List<ProgramElementDoc>> pkgToConstructorAnnotations;
68 final Map<String,List<ProgramElementDoc>> pkgToConstructorParameterAnnotations;
69 final Map<String,List<ProgramElementDoc>> pkgToConstructorArgs;
70 final Map<String,List<ProgramElementDoc>> pkgToConstructorArgTypeParameter;
71 final Map<String,List<ProgramElementDoc>> pkgToConstructorThrows;
72 final SortedSet<PackageDoc> pkgSet;
73 final MethodWriterImpl methodSubWriter;
74 final ConstructorWriterImpl constrSubWriter;
75 final FieldWriterImpl fieldSubWriter;
76 final NestedClassWriterImpl classSubWriter;
77 // Summary for various use tables.
78 final String classUseTableSummary;
79 final String subclassUseTableSummary;
80 final String subinterfaceUseTableSummary;
81 final String fieldUseTableSummary;
82 final String methodUseTableSummary;
83 final String constructorUseTableSummary;
85 /**
86 * Constructor.
87 *
88 * @param filename the file to be generated.
89 * @throws IOException
90 * @throws DocletAbortException
91 */
92 public ClassUseWriter(ConfigurationImpl configuration,
93 ClassUseMapper mapper, DocPath filename,
94 ClassDoc classdoc) throws IOException {
95 super(configuration, filename);
96 this.classdoc = classdoc;
97 if (mapper.classToPackageAnnotations.containsKey(classdoc.qualifiedName()))
98 pkgToPackageAnnotations = new HashSet<PackageDoc>(mapper.classToPackageAnnotations.get(classdoc.qualifiedName()));
99 configuration.currentcd = classdoc;
100 this.pkgSet = new TreeSet<PackageDoc>();
101 this.pkgToClassTypeParameter = pkgDivide(mapper.classToClassTypeParam);
102 this.pkgToClassAnnotations = pkgDivide(mapper.classToClassAnnotations);
103 this.pkgToMethodTypeParameter = pkgDivide(mapper.classToExecMemberDocTypeParam);
104 this.pkgToMethodArgTypeParameter = pkgDivide(mapper.classToExecMemberDocArgTypeParam);
105 this.pkgToFieldTypeParameter = pkgDivide(mapper.classToFieldDocTypeParam);
106 this.pkgToFieldAnnotations = pkgDivide(mapper.annotationToFieldDoc);
107 this.pkgToMethodReturnTypeParameter = pkgDivide(mapper.classToExecMemberDocReturnTypeParam);
108 this.pkgToMethodAnnotations = pkgDivide(mapper.classToExecMemberDocAnnotations);
109 this.pkgToMethodParameterAnnotations = pkgDivide(mapper.classToExecMemberDocParamAnnotation);
110 this.pkgToSubclass = pkgDivide(mapper.classToSubclass);
111 this.pkgToSubinterface = pkgDivide(mapper.classToSubinterface);
112 this.pkgToImplementingClass = pkgDivide(mapper.classToImplementingClass);
113 this.pkgToField = pkgDivide(mapper.classToField);
114 this.pkgToMethodReturn = pkgDivide(mapper.classToMethodReturn);
115 this.pkgToMethodArgs = pkgDivide(mapper.classToMethodArgs);
116 this.pkgToMethodThrows = pkgDivide(mapper.classToMethodThrows);
117 this.pkgToConstructorAnnotations = pkgDivide(mapper.classToConstructorAnnotations);
118 this.pkgToConstructorParameterAnnotations = pkgDivide(mapper.classToConstructorParamAnnotation);
119 this.pkgToConstructorArgs = pkgDivide(mapper.classToConstructorArgs);
120 this.pkgToConstructorArgTypeParameter = pkgDivide(mapper.classToConstructorDocArgTypeParam);
121 this.pkgToConstructorThrows = pkgDivide(mapper.classToConstructorThrows);
122 //tmp test
123 if (pkgSet.size() > 0 &&
124 mapper.classToPackage.containsKey(classdoc.qualifiedName()) &&
125 !pkgSet.equals(mapper.classToPackage.get(classdoc.qualifiedName()))) {
126 configuration.root.printWarning("Internal error: package sets don't match: " + pkgSet + " with: " +
127 mapper.classToPackage.get(classdoc.qualifiedName()));
128 }
129 methodSubWriter = new MethodWriterImpl(this);
130 constrSubWriter = new ConstructorWriterImpl(this);
131 fieldSubWriter = new FieldWriterImpl(this);
132 classSubWriter = new NestedClassWriterImpl(this);
133 classUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
134 configuration.getText("doclet.classes"));
135 subclassUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
136 configuration.getText("doclet.subclasses"));
137 subinterfaceUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
138 configuration.getText("doclet.subinterfaces"));
139 fieldUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
140 configuration.getText("doclet.fields"));
141 methodUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
142 configuration.getText("doclet.methods"));
143 constructorUseTableSummary = configuration.getText("doclet.Use_Table_Summary",
144 configuration.getText("doclet.constructors"));
145 }
147 /**
148 * Write out class use pages.
149 * @throws DocletAbortException
150 */
151 public static void generate(ConfigurationImpl configuration,
152 ClassTree classtree) {
153 ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree);
154 ClassDoc[] classes = configuration.root.classes();
155 for (int i = 0; i < classes.length; i++) {
156 // If -nodeprecated option is set and the containing package is marked
157 // as deprecated, do not generate the class-use page. We will still generate
158 // the class-use page if the class is marked as deprecated but the containing
159 // package is not since it could still be linked from that package-use page.
160 if (!(configuration.nodeprecated &&
161 Util.isDeprecated(classes[i].containingPackage())))
162 ClassUseWriter.generate(configuration, mapper, classes[i]);
163 }
164 PackageDoc[] pkgs = configuration.packages;
165 for (int i = 0; i < pkgs.length; i++) {
166 // If -nodeprecated option is set and the package is marked
167 // as deprecated, do not generate the package-use page.
168 if (!(configuration.nodeprecated && Util.isDeprecated(pkgs[i])))
169 PackageUseWriter.generate(configuration, mapper, pkgs[i]);
170 }
171 }
173 private Map<String,List<ProgramElementDoc>> pkgDivide(Map<String,? extends List<? extends ProgramElementDoc>> classMap) {
174 Map<String,List<ProgramElementDoc>> map = new HashMap<String,List<ProgramElementDoc>>();
175 List<? extends ProgramElementDoc> list= classMap.get(classdoc.qualifiedName());
176 if (list != null) {
177 Collections.sort(list);
178 Iterator<? extends ProgramElementDoc> it = list.iterator();
179 while (it.hasNext()) {
180 ProgramElementDoc doc = it.next();
181 PackageDoc pkg = doc.containingPackage();
182 pkgSet.add(pkg);
183 List<ProgramElementDoc> inPkg = map.get(pkg.name());
184 if (inPkg == null) {
185 inPkg = new ArrayList<ProgramElementDoc>();
186 map.put(pkg.name(), inPkg);
187 }
188 inPkg.add(doc);
189 }
190 }
191 return map;
192 }
194 /**
195 * Generate a class page.
196 */
197 public static void generate(ConfigurationImpl configuration,
198 ClassUseMapper mapper, ClassDoc classdoc) {
199 ClassUseWriter clsgen;
200 DocPath path = DocPath.forPackage(classdoc)
201 .resolve(DocPaths.CLASS_USE)
202 .resolve(DocPath.forName(classdoc));
203 try {
204 clsgen = new ClassUseWriter(configuration,
205 mapper, path,
206 classdoc);
207 clsgen.generateClassUseFile();
208 clsgen.close();
209 } catch (IOException exc) {
210 configuration.standardmessage.
211 error("doclet.exception_encountered",
212 exc.toString(), path.getPath());
213 throw new DocletAbortException();
214 }
215 }
217 /**
218 * Generate the class use list.
219 */
220 protected void generateClassUseFile() throws IOException {
221 Content body = getClassUseHeader();
222 HtmlTree div = new HtmlTree(HtmlTag.DIV);
223 div.addStyle(HtmlStyle.classUseContainer);
224 if (pkgSet.size() > 0) {
225 addClassUse(div);
226 } else {
227 div.addContent(getResource("doclet.ClassUse_No.usage.of.0",
228 classdoc.qualifiedName()));
229 }
230 body.addContent(div);
231 addNavLinks(false, body);
232 addBottom(body);
233 printHtmlDocument(null, true, body);
234 }
236 /**
237 * Add the class use documentation.
238 *
239 * @param contentTree the content tree to which the class use information will be added
240 */
241 protected void addClassUse(Content contentTree) throws IOException {
242 HtmlTree ul = new HtmlTree(HtmlTag.UL);
243 ul.addStyle(HtmlStyle.blockList);
244 if (configuration.packages.length > 1) {
245 addPackageList(ul);
246 addPackageAnnotationList(ul);
247 }
248 addClassList(ul);
249 contentTree.addContent(ul);
250 }
252 /**
253 * Add the packages list that use the given class.
254 *
255 * @param contentTree the content tree to which the packages list will be added
256 */
257 protected void addPackageList(Content contentTree) throws IOException {
258 Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
259 getTableCaption(configuration.getText(
260 "doclet.ClassUse_Packages.that.use.0",
261 getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
262 false)))));
263 table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
264 Content tbody = new HtmlTree(HtmlTag.TBODY);
265 Iterator<PackageDoc> it = pkgSet.iterator();
266 for (int i = 0; it.hasNext(); i++) {
267 PackageDoc pkg = it.next();
268 HtmlTree tr = new HtmlTree(HtmlTag.TR);
269 if (i % 2 == 0) {
270 tr.addStyle(HtmlStyle.altColor);
271 } else {
272 tr.addStyle(HtmlStyle.rowColor);
273 }
274 addPackageUse(pkg, tr);
275 tbody.addContent(tr);
276 }
277 table.addContent(tbody);
278 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
279 contentTree.addContent(li);
280 }
282 /**
283 * Add the package annotation list.
284 *
285 * @param contentTree the content tree to which the package annotation list will be added
286 */
287 protected void addPackageAnnotationList(Content contentTree) throws IOException {
288 if ((!classdoc.isAnnotationType()) ||
289 pkgToPackageAnnotations == null ||
290 pkgToPackageAnnotations.isEmpty()) {
291 return;
292 }
293 Content table = HtmlTree.TABLE(0, 3, 0, useTableSummary,
294 getTableCaption(configuration.getText(
295 "doclet.ClassUse_PackageAnnotation",
296 getLink(new LinkInfoImpl(configuration,
297 LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false)))));
298 table.addContent(getSummaryTableHeader(packageTableHeader, "col"));
299 Content tbody = new HtmlTree(HtmlTag.TBODY);
300 Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator();
301 for (int i = 0; it.hasNext(); i++) {
302 PackageDoc pkg = it.next();
303 HtmlTree tr = new HtmlTree(HtmlTag.TR);
304 if (i % 2 == 0) {
305 tr.addStyle(HtmlStyle.altColor);
306 } else {
307 tr.addStyle(HtmlStyle.rowColor);
308 }
309 Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
310 getPackageLink(pkg, new StringContent(pkg.name())));
311 tr.addContent(tdFirst);
312 HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
313 tdLast.addStyle(HtmlStyle.colLast);
314 addSummaryComment(pkg, tdLast);
315 tr.addContent(tdLast);
316 tbody.addContent(tr);
317 }
318 table.addContent(tbody);
319 Content li = HtmlTree.LI(HtmlStyle.blockList, table);
320 contentTree.addContent(li);
321 }
323 /**
324 * Add the class list that use the given class.
325 *
326 * @param contentTree the content tree to which the class list will be added
327 */
328 protected void addClassList(Content contentTree) throws IOException {
329 HtmlTree ul = new HtmlTree(HtmlTag.UL);
330 ul.addStyle(HtmlStyle.blockList);
331 for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
332 PackageDoc pkg = it.next();
333 Content li = HtmlTree.LI(HtmlStyle.blockList, getMarkerAnchor(pkg.name()));
334 Content link = new RawHtml(
335 configuration.getText("doclet.ClassUse_Uses.of.0.in.1",
336 getLink(new LinkInfoImpl(configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER,
337 classdoc, false)),
338 getPackageLinkString(pkg, Util.getPackageName(pkg), false)));
339 Content heading = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING, link);
340 li.addContent(heading);
341 addClassUse(pkg, li);
342 ul.addContent(li);
343 }
344 Content li = HtmlTree.LI(HtmlStyle.blockList, ul);
345 contentTree.addContent(li);
346 }
348 /**
349 * Add the package use information.
350 *
351 * @param pkg the package that uses the given class
352 * @param contentTree the content tree to which the package use information will be added
353 */
354 protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException {
355 Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
356 getHyperLink(pkg.name(), new StringContent(Util.getPackageName(pkg))));
357 contentTree.addContent(tdFirst);
358 HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
359 tdLast.addStyle(HtmlStyle.colLast);
360 addSummaryComment(pkg, tdLast);
361 contentTree.addContent(tdLast);
362 }
364 /**
365 * Add the class use information.
366 *
367 * @param pkg the package that uses the given class
368 * @param contentTree the content tree to which the class use information will be added
369 */
370 protected void addClassUse(PackageDoc pkg, Content contentTree) throws IOException {
371 String classLink = getLink(new LinkInfoImpl(configuration,
372 LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc, false));
373 String pkgLink = getPackageLinkString(pkg, Util.getPackageName(pkg), false);
374 classSubWriter.addUseInfo(pkgToClassAnnotations.get(pkg.name()),
375 configuration.getText("doclet.ClassUse_Annotation", classLink,
376 pkgLink), classUseTableSummary, contentTree);
377 classSubWriter.addUseInfo(pkgToClassTypeParameter.get(pkg.name()),
378 configuration.getText("doclet.ClassUse_TypeParameter", classLink,
379 pkgLink), classUseTableSummary, contentTree);
380 classSubWriter.addUseInfo(pkgToSubclass.get(pkg.name()),
381 configuration.getText("doclet.ClassUse_Subclass", classLink,
382 pkgLink), subclassUseTableSummary, contentTree);
383 classSubWriter.addUseInfo(pkgToSubinterface.get(pkg.name()),
384 configuration.getText("doclet.ClassUse_Subinterface", classLink,
385 pkgLink), subinterfaceUseTableSummary, contentTree);
386 classSubWriter.addUseInfo(pkgToImplementingClass.get(pkg.name()),
387 configuration.getText("doclet.ClassUse_ImplementingClass", classLink,
388 pkgLink), classUseTableSummary, contentTree);
389 fieldSubWriter.addUseInfo(pkgToField.get(pkg.name()),
390 configuration.getText("doclet.ClassUse_Field", classLink,
391 pkgLink), fieldUseTableSummary, contentTree);
392 fieldSubWriter.addUseInfo(pkgToFieldAnnotations.get(pkg.name()),
393 configuration.getText("doclet.ClassUse_FieldAnnotations", classLink,
394 pkgLink), fieldUseTableSummary, contentTree);
395 fieldSubWriter.addUseInfo(pkgToFieldTypeParameter.get(pkg.name()),
396 configuration.getText("doclet.ClassUse_FieldTypeParameter", classLink,
397 pkgLink), fieldUseTableSummary, contentTree);
398 methodSubWriter.addUseInfo(pkgToMethodAnnotations.get(pkg.name()),
399 configuration.getText("doclet.ClassUse_MethodAnnotations", classLink,
400 pkgLink), methodUseTableSummary, contentTree);
401 methodSubWriter.addUseInfo(pkgToMethodParameterAnnotations.get(pkg.name()),
402 configuration.getText("doclet.ClassUse_MethodParameterAnnotations", classLink,
403 pkgLink), methodUseTableSummary, contentTree);
404 methodSubWriter.addUseInfo(pkgToMethodTypeParameter.get(pkg.name()),
405 configuration.getText("doclet.ClassUse_MethodTypeParameter", classLink,
406 pkgLink), methodUseTableSummary, contentTree);
407 methodSubWriter.addUseInfo(pkgToMethodReturn.get(pkg.name()),
408 configuration.getText("doclet.ClassUse_MethodReturn", classLink,
409 pkgLink), methodUseTableSummary, contentTree);
410 methodSubWriter.addUseInfo(pkgToMethodReturnTypeParameter.get(pkg.name()),
411 configuration.getText("doclet.ClassUse_MethodReturnTypeParameter", classLink,
412 pkgLink), methodUseTableSummary, contentTree);
413 methodSubWriter.addUseInfo(pkgToMethodArgs.get(pkg.name()),
414 configuration.getText("doclet.ClassUse_MethodArgs", classLink,
415 pkgLink), methodUseTableSummary, contentTree);
416 methodSubWriter.addUseInfo(pkgToMethodArgTypeParameter.get(pkg.name()),
417 configuration.getText("doclet.ClassUse_MethodArgsTypeParameters", classLink,
418 pkgLink), methodUseTableSummary, contentTree);
419 methodSubWriter.addUseInfo(pkgToMethodThrows.get(pkg.name()),
420 configuration.getText("doclet.ClassUse_MethodThrows", classLink,
421 pkgLink), methodUseTableSummary, contentTree);
422 constrSubWriter.addUseInfo(pkgToConstructorAnnotations.get(pkg.name()),
423 configuration.getText("doclet.ClassUse_ConstructorAnnotations", classLink,
424 pkgLink), constructorUseTableSummary, contentTree);
425 constrSubWriter.addUseInfo(pkgToConstructorParameterAnnotations.get(pkg.name()),
426 configuration.getText("doclet.ClassUse_ConstructorParameterAnnotations", classLink,
427 pkgLink), constructorUseTableSummary, contentTree);
428 constrSubWriter.addUseInfo(pkgToConstructorArgs.get(pkg.name()),
429 configuration.getText("doclet.ClassUse_ConstructorArgs", classLink,
430 pkgLink), constructorUseTableSummary, contentTree);
431 constrSubWriter.addUseInfo(pkgToConstructorArgTypeParameter.get(pkg.name()),
432 configuration.getText("doclet.ClassUse_ConstructorArgsTypeParameters", classLink,
433 pkgLink), constructorUseTableSummary, contentTree);
434 constrSubWriter.addUseInfo(pkgToConstructorThrows.get(pkg.name()),
435 configuration.getText("doclet.ClassUse_ConstructorThrows", classLink,
436 pkgLink), constructorUseTableSummary, contentTree);
437 }
439 /**
440 * Get the header for the class use Listing.
441 *
442 * @return a content tree representing the class use header
443 */
444 protected Content getClassUseHeader() {
445 String cltype = configuration.getText(classdoc.isInterface()?
446 "doclet.Interface":"doclet.Class");
447 String clname = classdoc.qualifiedName();
448 String title = configuration.getText("doclet.Window_ClassUse_Header",
449 cltype, clname);
450 Content bodyTree = getBody(true, getWindowTitle(title));
451 addTop(bodyTree);
452 addNavLinks(true, bodyTree);
453 Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
454 Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
455 true, HtmlStyle.title, headContent);
456 Content div = HtmlTree.DIV(HtmlStyle.header, heading);
457 bodyTree.addContent(div);
458 return bodyTree;
459 }
461 /**
462 * Get this package link.
463 *
464 * @return a content tree for the package link
465 */
466 protected Content getNavLinkPackage() {
467 Content linkContent =
468 getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_SUMMARY), packageLabel);
469 Content li = HtmlTree.LI(linkContent);
470 return li;
471 }
473 /**
474 * Get class page link.
475 *
476 * @return a content tree for the class page link
477 */
478 protected Content getNavLinkClass() {
479 Content linkContent = new RawHtml(getLink(new LinkInfoImpl(
480 configuration, LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
481 "", configuration.getText("doclet.Class"), false)));
482 Content li = HtmlTree.LI(linkContent);
483 return li;
484 }
486 /**
487 * Get the use link.
488 *
489 * @return a content tree for the use link
490 */
491 protected Content getNavLinkClassUse() {
492 Content li = HtmlTree.LI(HtmlStyle.navBarCell1Rev, useLabel);
493 return li;
494 }
496 /**
497 * Get the tree link.
498 *
499 * @return a content tree for the tree link
500 */
501 protected Content getNavLinkTree() {
502 Content linkContent = classdoc.containingPackage().isIncluded() ?
503 getHyperLink(DocPath.parent.resolve(DocPaths.PACKAGE_TREE), treeLabel) :
504 getHyperLink(pathToRoot.resolve(DocPaths.OVERVIEW_TREE), treeLabel);
505 Content li = HtmlTree.LI(linkContent);
506 return li;
507 }
508 }